/* Lost Morals — header & footer chrome */

/* Hide default Astra header/footer builder chrome when custom is present */
body.lostmorals-theme .main-header-bar,
body.lostmorals-theme .ast-primary-header-bar,
body.lostmorals-theme .ast-mobile-header-wrap,
body.lostmorals-theme .site-footer,
body.lostmorals-theme .ast-footer-overlay,
body.lostmorals-theme footer.site-footer {
	/* Custom templates replace these; keep as safety net */
}

body.lostmorals-theme {
	padding-top: 0;
}

/* —— HEADER —— */
/* Sticky header shell (category bar scrolls away) */
.lm-chrome-sticky {
	position: sticky;
	top: 0;
	z-index: 1000;
	width: 100%;
}

.lm-chrome-header {
	position: relative;
	top: auto;
	z-index: auto;
	width: 100%;
}

.lm-chrome-header__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.25rem;
	min-height: 72px;
	padding: 0.7rem clamp(1rem, 3.5vw, 2.5rem);
	background: rgba(11, 11, 11, 0.92);
	backdrop-filter: blur(16px) saturate(140%);
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	transition: background 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

body.lm-scrolled .lm-chrome-header__bar {
	background: rgba(8, 8, 8, 0.97);
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
	border-bottom-color: rgba(207, 42, 42, 0.35);
}

.lm-chrome-header__brand {
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
	text-decoration: none !important;
	color: #fff !important;
	min-width: 0;
}

.lm-chrome-header__brand img {
	width: 42px;
	height: 42px;
	border-radius: 9px;
	display: block;
}

.lm-chrome-header__name {
	font-family: var(--lm-font-display);
	font-size: 0.95rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	white-space: nowrap;
}

.lm-chrome-header__nav {
	flex: 1;
	display: flex;
	justify-content: center;
}

.lm-chrome-menu {
	display: flex;
	align-items: center;
	gap: 0.15rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.lm-chrome-menu > li {
	margin: 0;
	position: relative;
}

.lm-chrome-menu a {
	display: block;
	padding: 0.55rem 0.9rem;
	color: rgba(255, 255, 255, 0.78) !important;
	text-decoration: none !important;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	transition: color 0.2s ease;
}

.lm-chrome-menu a:hover,
.lm-chrome-menu .current-menu-item > a,
.lm-chrome-menu .current_page_item > a {
	color: #fff !important;
}

.lm-chrome-menu > li > a {
	position: relative;
}

.lm-chrome-menu > li > a::after {
	content: "";
	position: absolute;
	left: 0.9rem;
	right: 0.9rem;
	bottom: 0.25rem;
	height: 2px;
	background: var(--lm-signal);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.25s ease;
}

.lm-chrome-menu > li > a:hover::after,
.lm-chrome-menu .current-menu-item > a::after,
.lm-chrome-menu .current_page_item > a::after {
	transform: scaleX(1);
}

.lm-chrome-menu .sub-menu {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 180px;
	margin: 0;
	padding: 0.4rem 0;
	list-style: none;
	background: #141414;
	border: 1px solid rgba(255, 255, 255, 0.08);
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.lm-chrome-menu > li:hover > .sub-menu {
	display: block;
}

.lm-chrome-header__actions {
	display: flex;
	align-items: center;
	gap: 0.35rem;
}

.lm-chrome-iconbtn {
	position: relative;
	display: inline-grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 2px;
	background: transparent;
	color: rgba(255, 255, 255, 0.92) !important;
	text-decoration: none !important;
	cursor: pointer;
	padding: 0;
	transition: background 0.2s ease, color 0.2s ease;
}

.lm-chrome-iconbtn:hover {
	background: rgba(255, 255, 255, 0.08);
	color: #fff !important;
}

.lm-chrome-iconbtn svg,
.lm-chrome-search__glyph svg,
.lm-chrome-search__close svg,
.lm-chrome-drawer__close svg,
.lm-chrome-drawer__search button svg {
	display: block;
	stroke: currentColor;
	stroke-width: 1.75;
	stroke-linecap: round;
	stroke-linejoin: round;
	fill: none;
}

.lm-chrome-iconbtn__close {
	display: none;
}

body.lm-search-open .lm-chrome-search-toggle {
	color: var(--lm-signal) !important;
	background: rgba(207, 42, 42, 0.12);
}

body.lm-search-open .lm-chrome-search-toggle .lm-chrome-iconbtn__search {
	display: none;
}

body.lm-search-open .lm-chrome-search-toggle .lm-chrome-iconbtn__close {
	display: block;
}

.lm-chrome-cart__count {
	position: absolute;
	top: 4px;
	right: 4px;
	min-width: 16px;
	height: 16px;
	padding: 0 4px;
	border-radius: 2px;
	background: var(--lm-signal);
	color: #fff;
	font-size: 0.62rem;
	font-weight: 700;
	line-height: 16px;
	text-align: center;
}

/* Header search panel */
.lm-chrome-search {
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	background: #0a0a0a;
	max-height: 0;
	overflow: hidden;
	opacity: 0;
	transition: max-height 0.3s ease, opacity 0.25s ease;
}

.lm-chrome-search[hidden] {
	display: block !important;
	pointer-events: none;
}

body.lm-search-open .lm-chrome-search {
	max-height: 140px;
	opacity: 1;
	pointer-events: auto;
}

.lm-chrome-search__form {
	display: grid;
	grid-template-columns: auto 1fr auto auto;
	align-items: center;
	gap: 0.85rem;
	max-width: 920px;
	margin: 0 auto;
	padding: 1rem clamp(1rem, 3.5vw, 2.5rem) 1.15rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.lm-chrome-search__glyph {
	display: grid;
	place-items: center;
	color: rgba(255, 255, 255, 0.55);
	flex-shrink: 0;
}

.lm-chrome-search__input,
.lm-chrome-search__form input[type="search"],
.lm-chrome-search__form input.lm-chrome-search__input,
body.lostmorals-theme .lm-chrome-search__input {
	width: 100%;
	border: 0 !important;
	border-bottom: 1px solid rgba(255, 255, 255, 0.22) !important;
	outline: none !important;
	background: transparent !important;
	background-color: transparent !important;
	color: #ffffff !important;
	-webkit-text-fill-color: #ffffff !important;
	caret-color: #ff4d4a !important;
	font-family: var(--lm-font-body) !important;
	font-size: 1.15rem !important;
	font-weight: 500 !important;
	line-height: 1.4 !important;
	padding: 0.7rem 0 !important;
	box-shadow: none !important;
	height: auto !important;
	min-height: 0 !important;
	border-radius: 0 !important;
	opacity: 1 !important;
}

.lm-chrome-search__input:focus,
.lm-chrome-search__input:focus-visible {
	color: #ffffff !important;
	-webkit-text-fill-color: #ffffff !important;
	border-bottom-color: var(--lm-signal) !important;
	outline: none !important;
	box-shadow: none !important;
}

.lm-chrome-search__input::placeholder,
body.lostmorals-theme .lm-chrome-search__input::placeholder {
	color: rgba(255, 255, 255, 0.55) !important;
	-webkit-text-fill-color: rgba(255, 255, 255, 0.55) !important;
	opacity: 1 !important;
}

.lm-chrome-search__input::-webkit-search-decoration,
.lm-chrome-search__input::-webkit-search-cancel-button,
.lm-chrome-search__input::-webkit-search-results-button,
.lm-chrome-search__input::-webkit-search-results-decoration {
	display: none;
}

.lm-chrome-search__submit {
	border: 0;
	background: var(--lm-signal);
	color: #fff;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	padding: 0.7rem 1rem;
	border-radius: 2px;
	cursor: pointer;
	transition: background 0.2s ease;
}

.lm-chrome-search__submit:hover {
	background: var(--lm-signal-deep);
}

.lm-chrome-search__close {
	display: inline-grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border: 0;
	background: transparent;
	color: rgba(255, 255, 255, 0.75);
	cursor: pointer;
	padding: 0;
	border-radius: 2px;
}

.lm-chrome-search__close:hover {
	color: #fff;
	background: rgba(255, 255, 255, 0.08);
}

.lm-chrome-drawer__close {
	border: 0;
	background: transparent;
	color: #fff;
	cursor: pointer;
	padding: 0.25rem;
	display: grid;
	place-items: center;
}

.lm-chrome-drawer__search {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 0.5rem;
	margin-bottom: 0.75rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.lm-chrome-drawer__search input[type="search"],
.lm-chrome-drawer__search-input {
	width: 100%;
	border: 1px solid rgba(255, 255, 255, 0.14) !important;
	background: #151515 !important;
	color: #ffffff !important;
	-webkit-text-fill-color: #ffffff !important;
	caret-color: #ffffff !important;
	padding: 0.8rem 0.9rem !important;
	border-radius: 2px !important;
	font-size: 0.95rem !important;
	height: auto !important;
	box-shadow: none !important;
	opacity: 1 !important;
}

.lm-chrome-drawer__search input::placeholder {
	color: rgba(255, 255, 255, 0.45) !important;
	-webkit-text-fill-color: rgba(255, 255, 255, 0.45) !important;
	opacity: 1 !important;
}

.lm-chrome-drawer__search button {
	border: 0;
	background: var(--lm-signal);
	color: #fff;
	width: 46px;
	display: grid;
	place-items: center;
	cursor: pointer;
	border-radius: 2px;
}

.lm-chrome-cta {
	display: inline-flex;
	align-items: center;
	padding: 0.65rem 1rem;
	margin-left: 0.25rem;
	background: var(--lm-signal);
	color: #fff !important;
	text-decoration: none !important;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	border-radius: 2px;
	transition: background 0.2s ease, transform 0.2s ease;
}

.lm-chrome-cta:hover {
	background: var(--lm-signal-deep);
	transform: translateY(-1px);
}

.lm-chrome-toggle {
	display: none;
	width: 42px;
	height: 42px;
	border: 0;
	background: transparent;
	color: #fff;
	cursor: pointer;
	padding: 0;
}

.lm-chrome-toggle__lines {
	display: grid;
	gap: 5px;
	width: 20px;
	margin: 0 auto;
}

.lm-chrome-toggle__lines span {
	display: block;
	height: 2px;
	background: currentColor;
	transition: transform 0.25s ease, opacity 0.25s ease;
}

body.lm-nav-open .lm-chrome-toggle__lines span:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

body.lm-nav-open .lm-chrome-toggle__lines span:nth-child(2) {
	opacity: 0;
}

body.lm-nav-open .lm-chrome-toggle__lines span:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

/* Mobile drawer */
.lm-chrome-drawer {
	position: fixed;
	inset: 0;
	z-index: 1100;
	background: rgba(0, 0, 0, 0.55);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease, visibility 0.25s ease;
}

.lm-chrome-drawer[hidden] {
	display: block !important;
	pointer-events: none;
}

body.lm-nav-open .lm-chrome-drawer {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.lm-chrome-drawer__panel {
	position: absolute;
	top: 0;
	right: 0;
	width: min(860px, 86vw);
	height: 100%;
	background: #0d0d0d;
	border-left: 1px solid rgba(255, 255, 255, 0.08);
	padding: 1.25rem 1.35rem 2rem;
	transform: translateX(100%);
	transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

body.lm-nav-open .lm-chrome-drawer__panel {
	transform: translateX(0);
}

.lm-chrome-drawer__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	color: rgba(255, 255, 255, 0.55);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.lm-chrome-drawer__menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

.lm-chrome-drawer__menu a {
	display: block;
	padding: 0.95rem 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	color: #fff !important;
	text-decoration: none !important;
	font-family: var(--lm-font-display);
	font-size: 1.25rem;
	font-weight: 700;
}

.lm-chrome-drawer__menu a:hover {
	color: var(--lm-signal) !important;
}

.lm-chrome-drawer__cta {
	margin-top: auto;
	justify-content: center;
	width: 100%;
}

/* —— FOOTER —— */
.lm-chrome-footer {
	background: #080808;
	color: rgba(255, 255, 255, 0.72);
	border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.lm-chrome-footer__top {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr);
	gap: clamp(2rem, 5vw, 4rem);
	padding: clamp(3rem, 6vw, 4.5rem) clamp(1.25rem, 4vw, 3rem);
	max-width: 1240px;
	margin: 0 auto;
}

.lm-chrome-footer__logo {
	display: inline-flex;
	align-items: center;
	gap: 0.8rem;
	margin-bottom: 1rem;
	text-decoration: none !important;
	color: #fff !important;
}

.lm-chrome-footer__logo img {
	width: 52px;
	height: 52px;
	border-radius: 10px;
}

.lm-chrome-footer__logo span {
	font-family: var(--lm-font-display);
	font-size: 1.05rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.lm-chrome-footer__tagline {
	margin: 0 0 1.25rem;
	max-width: 28rem;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.62);
}

.lm-chrome-footer__shop {
	display: inline-flex;
	color: #fff !important;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-decoration: none !important;
	border-bottom: 2px solid var(--lm-signal);
	padding-bottom: 0.2rem;
	transition: color 0.2s ease;
}

.lm-chrome-footer__shop:hover {
	color: var(--lm-signal) !important;
}

.lm-chrome-footer__cols {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.5rem;
}

.lm-chrome-footer__col h3 {
	margin: 0 0 1rem;
	font-family: var(--lm-font-display);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #fff;
}

.lm-chrome-footer__col ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.lm-chrome-footer__col li + li {
	margin-top: 0.55rem;
}

.lm-chrome-footer__col a {
	color: rgba(255, 255, 255, 0.62) !important;
	text-decoration: none !important;
	font-size: 0.95rem;
	transition: color 0.2s ease;
}

.lm-chrome-footer__col a:hover {
	color: var(--lm-signal) !important;
}

.lm-chrome-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 1.1rem clamp(1.25rem, 4vw, 3rem);
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	max-width: 1240px;
	margin: 0 auto;
	font-size: 0.82rem;
	color: rgba(255, 255, 255, 0.45);
}

.lm-chrome-footer__bottom p {
	margin: 0;
}

.lm-chrome-footer__signal {
	color: var(--lm-signal) !important;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	font-size: 0.72rem !important;
}

@media (max-width: 960px) {
	.lm-chrome-header__nav {
		display: none;
	}

	.lm-chrome-cta {
		display: none;
	}

	.lm-chrome-toggle {
		display: inline-grid;
		place-items: center;
	}

	.lm-chrome-header__bar {
		min-height: 60px;
		padding: 0.55rem 0.9rem;
		padding-left: max(0.9rem, env(safe-area-inset-left));
		padding-right: max(0.9rem, env(safe-area-inset-right));
		gap: 0.65rem;
	}

	.lm-chrome-header__brand {
		gap: 0.55rem;
		flex: 1;
		min-width: 0;
	}

	.lm-chrome-header__brand img {
		width: 36px;
		height: 36px;
		border-radius: 8px;
		flex-shrink: 0;
	}

	.lm-chrome-header__actions {
		gap: 0.15rem;
		flex-shrink: 0;
	}

	.lm-chrome-iconbtn {
		width: 42px;
		height: 42px;
	}

	.lm-chrome-toggle {
		width: 42px;
		height: 42px;
	}

	.lm-chrome-search__form {
		padding: 0.85rem 0.9rem;
		padding-left: max(0.9rem, env(safe-area-inset-left));
		padding-right: max(0.9rem, env(safe-area-inset-right));
		gap: 0.55rem;
	}

	.lm-chrome-drawer__panel {
		width: min(100%, 360px);
		padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
	}

	.lm-chrome-footer__top {
		grid-template-columns: 1fr;
		padding: 2.5rem 1.25rem 1.75rem;
	}

	.lm-chrome-footer__cols {
		grid-template-columns: 1fr 1fr;
		gap: 1.5rem;
	}

	.lm-chrome-footer__bottom {
		padding: 1.1rem 1.25rem;
		padding-bottom: max(1.1rem, env(safe-area-inset-bottom));
	}
}

@media (max-width: 560px) {
	.lm-chrome-header__name {
		font-size: 0.78rem;
		letter-spacing: 0.05em;
		overflow: hidden;
		text-overflow: ellipsis;
		max-width: 42vw;
	}

	.lm-chrome-header__actions .lm-chrome-iconbtn:not(.lm-chrome-search-toggle):not(.lm-chrome-cart) {
		display: none;
	}

	.lm-chrome-search__form {
		grid-template-columns: auto 1fr auto;
	}

	.lm-chrome-search__submit {
		display: none;
	}

	.lm-chrome-search__input,
	.lm-chrome-search__form input[type="search"] {
		font-size: 16px !important; /* prevent iOS zoom */
	}

	.lm-chrome-footer__cols {
		grid-template-columns: 1fr;
	}

	.lm-chrome-footer__bottom {
		flex-direction: column;
		align-items: flex-start;
	}

	.lm-catbar {
		padding-bottom: 0.15rem;
	}

	.lm-catbar__track {
		justify-content: flex-start;
		gap: 0.95rem;
		padding: 0.7rem 1rem;
		scroll-snap-type: x mandatory;
		scroll-padding-left: 1rem;
	}

	.lm-catbar__item {
		scroll-snap-align: start;
		min-width: 64px;
	}

	.lm-catbar__icon {
		width: 44px;
		height: 44px;
	}

	.lm-catbar__label {
		font-size: 0.65rem;
		max-width: 72px;
	}
}

/* —— CATEGORY BAR —— */
.lm-catbar {
	width: 100%;
	background: #1c1c1c;
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
	position: relative;
	z-index: 1;
}

.lm-catbar__track {
	display: flex;
	align-items: stretch;
	justify-content: center;
	gap: clamp(1.25rem, 3.5vw, 2.75rem);
	padding: 0.85rem clamp(1rem, 3vw, 2rem);
	overflow-x: auto;
	scrollbar-width: thin;
	scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
	-webkit-overflow-scrolling: touch;
}

.lm-catbar__track::-webkit-scrollbar {
	height: 4px;
}

.lm-catbar__track::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.2);
	border-radius: 4px;
}

.lm-catbar__item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.45rem;
	min-width: 72px;
	text-decoration: none !important;
	color: #fff !important;
	flex: 0 0 auto;
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.lm-catbar__item:hover {
	transform: translateY(-2px);
	opacity: 0.92;
}

.lm-catbar__icon {
	display: grid;
	place-items: center;
	width: 52px;
	height: 52px;
	background: #fff;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 1px 0 rgba(0, 0, 0, 0.15);
}

.lm-catbar__img {
	width: 78%;
	height: 78%;
	object-fit: contain;
	display: block;
}

.lm-catbar__placeholder {
	font-family: var(--lm-font-display);
	font-size: 1.1rem;
	font-weight: 700;
	color: #1c1c1c;
	line-height: 1;
}

.lm-catbar__label {
	font-family: var(--lm-font-body);
	font-size: 0.72rem;
	font-weight: 500;
	line-height: 1.25;
	text-align: center;
	color: rgba(255, 255, 255, 0.92);
	max-width: 88px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

@media (max-width: 640px) {
	.lm-catbar__track {
		justify-content: flex-start;
	}
}
