/* NoirMusk — sticky header + slide-out cart */

/* ------------------------------------------------------------ sticky header */
html body #site-header.site-header--default {
	position: sticky;
	top: 0;
	z-index: 900;
	background: #fff;
	transition: box-shadow 0.25s ease;
}
html body.admin-bar #site-header.site-header--default {
	top: var(--wp-admin--admin-bar--height, 32px);
}
/* The header keeps the same height whether or not the page has scrolled. (It used to slim down from 100px to 80px, which
   moves everything below it by 20px; near the top of the page that shift fed back into the scroll position and the header
   jittered when scrolling up.) Only the shadow changes. */
html body #site-header.site-header--default.is-scrolled {
	box-shadow: 0 8px 26px -16px rgba(26, 26, 26, 0.35);
}

/* ------------------------------------------------------------ the drawer */
html.noirmusk-minicart-open,
html.noirmusk-minicart-open body {
	overflow: hidden;
}
.noirmusk-minicart {
	position: fixed;
	inset: 0;
	z-index: 100001;
	visibility: hidden;
	pointer-events: none;
	transition: visibility 0s linear 0.55s;
	font-family: var(--theme-body-font-family), 'Inter', sans-serif;
}
.noirmusk-minicart.is-open {
	visibility: visible;
	pointer-events: auto;
	transition-delay: 0s;
}
.noirmusk-minicart__overlay {
	position: absolute;
	inset: 0;
	background: rgba(20, 17, 12, 0.5);
	opacity: 0;
	transition: opacity 0.55s ease;
}
.noirmusk-minicart.is-open .noirmusk-minicart__overlay {
	opacity: 1;
}
.noirmusk-minicart__panel {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	display: flex;
	flex-direction: column;
	width: min(440px, 100vw);
	background: #fff;
	box-shadow: -20px 0 60px -30px rgba(20, 17, 12, 0.45);
	transform: translateX(104%);
	transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
	will-change: transform;
	outline: none;
}
.noirmusk-minicart.is-open .noirmusk-minicart__panel {
	transform: none;
	/* a slow, soft slide in: it starts gently, glides, and settles */
	transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
/* the items ease in a moment after the panel starts moving (only while it opens, not on every quantity change) */
.noirmusk-minicart.is-opening .noirmusk-mc-item,
.noirmusk-minicart.is-opening .noirmusk-minicart__foot,
.noirmusk-minicart.is-opening .noirmusk-minicart__empty {
	animation: noirmusk-mc-in 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.noirmusk-minicart.is-opening .noirmusk-mc-item:nth-child(2) { animation-delay: 0.08s; }
.noirmusk-minicart.is-opening .noirmusk-mc-item:nth-child(3) { animation-delay: 0.16s; }
.noirmusk-minicart.is-opening .noirmusk-mc-item:nth-child(n + 4) { animation-delay: 0.22s; }
.noirmusk-minicart.is-opening .noirmusk-minicart__foot,
.noirmusk-minicart.is-opening .noirmusk-minicart__empty { animation-delay: 0.18s; }
@keyframes noirmusk-mc-in {
	from {
		opacity: 0;
		transform: translateY(14px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

/* header */
.noirmusk-minicart__head {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: space-between;
	padding: 22px 24px 20px;
	border-bottom: 1px solid #ece7de;
}
.noirmusk-minicart__head h2 {
	margin: 0;
	font-family: var(--theme-heading-font-family);
	font-size: 26px;
	font-weight: 700;
	line-height: 1.2;
	color: #1a1a1a;
}
.noirmusk-minicart__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	margin: -6px -8px -6px 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #1a1a1a;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}
.noirmusk-minicart__close:hover,
.noirmusk-minicart__close:focus-visible {
	background: #f3ede0;
	color: #a3703f;
	outline: none;
}

/* the inner block (a WooCommerce fragment) fills the rest of the panel */
.noirmusk-minicart__inner {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-height: 0;
}

/* items */
.noirmusk-minicart__scroll {
	flex: 1 1 auto;
	min-height: 0;
	padding: 8px 24px 20px;
	overflow-y: auto;
	overscroll-behavior: contain;
}
.noirmusk-minicart__items {
	margin: 0;
	padding: 0;
	list-style: none;
}
.noirmusk-mc-item {
	display: flex;
	gap: 16px;
	margin: 0;
	padding: 18px 0;
	border-bottom: 1px solid #f0ebe1;
	transition: opacity 0.2s ease;
}
.noirmusk-mc-item:last-child {
	border-bottom: 0;
}
.noirmusk-mc-item.is-loading {
	opacity: 0.45;
	pointer-events: none;
}
.noirmusk-mc-item__thumb {
	display: block;
	flex: none;
	width: 84px;
	height: 84px;
	overflow: hidden;
	border-radius: 10px;
	background: #f6f1e8;
}
.noirmusk-mc-item__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: cover;
}
.noirmusk-mc-item__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-width: 0;
}
.noirmusk-mc-item__top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 10px;
}
.noirmusk-minicart a.noirmusk-mc-item__name,
.noirmusk-mc-item__name {
	font-family: var(--theme-heading-font-family);
	font-size: 18px;
	font-weight: 700;
	line-height: 1.25;
	color: #1a1a1a;
	text-decoration: none;
}
.noirmusk-minicart a.noirmusk-mc-item__name:hover {
	color: #a3703f;
}
.noirmusk-mc-item__remove {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	margin: -4px -6px 0 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #8a8378;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}
.noirmusk-mc-item__remove:hover,
.noirmusk-mc-item__remove:focus-visible {
	background: #f3ede0;
	color: #b4463a;
	outline: none;
}
.noirmusk-mc-item__body dl.variation {
	margin: 4px 0 0;
	font-size: 13px;
	color: #6b665d;
}
.noirmusk-mc-item__price {
	margin-top: 4px;
	font-size: 14px;
	color: #8a8378;
}
.noirmusk-mc-item__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: auto;
	padding-top: 10px;
}
.noirmusk-mc-item__line {
	font-size: 16px;
	font-weight: 600;
	color: #1a1a1a;
}

/* quantity stepper */
.noirmusk-mc-qty {
	display: inline-flex;
	align-items: center;
	height: 36px;
	border: 1px solid #e0d5bf;
	border-radius: 4px;
	background: #fff;
}
.noirmusk-mc-qty button {
	width: 34px;
	height: 34px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 3px;
	background: transparent;
	font-size: 18px;
	line-height: 1;
	color: #1a1a1a;
	cursor: pointer;
	transition: color 0.2s ease, background-color 0.2s ease;
}
.noirmusk-mc-qty button:hover:not(:disabled),
.noirmusk-mc-qty button:focus-visible {
	background: #f3ede0;
	color: #a3703f;
	outline: none;
}
.noirmusk-mc-qty button:disabled {
	opacity: 0.3;
	cursor: not-allowed;
}
.noirmusk-mc-qty__n {
	min-width: 26px;
	font-size: 15px;
	font-weight: 600;
	text-align: center;
	color: #1a1a1a;
}

/* ------------------------------------------------------------ tester picker */
.noirmusk-mc-testers {
	margin-top: 8px;
	border: 1px solid #e7dcc8;
	border-radius: 10px;
	background: #fbf8f2;
}
.noirmusk-mc-testers__head {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 16px 18px;
	list-style: none;
	cursor: pointer;
}
.noirmusk-mc-testers__head::-webkit-details-marker {
	display: none;
}
.noirmusk-mc-testers__icon {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: #f0e2cc;
	color: #a3703f;
}
.noirmusk-mc-testers__intro {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-width: 0;
}
.noirmusk-mc-testers__title {
	font-family: var(--theme-heading-font-family);
	font-size: 18px;
	font-weight: 700;
	line-height: 1.25;
	color: #1a1a1a;
}
.noirmusk-mc-testers__sub {
	margin-top: 2px;
	font-size: 13px;
	line-height: 1.4;
	color: #8a8378;
}
.noirmusk-mc-testers__count {
	flex: none;
	min-width: 24px;
	padding: 2px 8px;
	border-radius: 999px;
	background: #a3703f;
	font-size: 12px;
	font-weight: 700;
	text-align: center;
	color: #fff;
}
.noirmusk-mc-testers__chevron {
	flex: none;
	width: 9px;
	height: 9px;
	margin: 0 4px 3px 0;
	border-right: 1.8px solid #8a8378;
	border-bottom: 1.8px solid #8a8378;
	transform: rotate(45deg);
	transition: transform 0.3s ease;
}
.noirmusk-mc-testers[open] .noirmusk-mc-testers__chevron {
	margin-bottom: -3px;
	transform: rotate(225deg);
}
.noirmusk-mc-testers__list {
	max-height: 264px;
	margin: 0;
	padding: 4px 8px 8px;
	overflow-y: auto;
	list-style: none;
	border-top: 1px solid #ece4d3;
	overscroll-behavior: contain;
}
.noirmusk-mc-testers__list li {
	margin: 0;
	padding: 0;
}
.noirmusk-mc-tester {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 10px;
	border-radius: 8px;
	cursor: pointer;
	transition: background-color 0.2s ease, opacity 0.2s ease;
}
.noirmusk-mc-tester:hover {
	background: #f3ede0;
}
.noirmusk-mc-tester.is-loading {
	opacity: 0.5;
	pointer-events: none;
}
.noirmusk-mc-tester__input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}
.noirmusk-mc-tester__thumb {
	display: block;
	flex: none;
	width: 44px;
	height: 44px;
	overflow: hidden;
	border-radius: 8px;
	background: #f6f1e8;
}
.noirmusk-mc-tester__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: cover;
}
.noirmusk-mc-tester__name {
	flex: 1 1 auto;
	min-width: 0;
	font-size: 15px;
	font-weight: 500;
	color: #1a1a1a;
}
.noirmusk-mc-tester__box {
	position: relative;
	flex: none;
	width: 20px;
	height: 20px;
	box-sizing: border-box;
	border: 1.5px solid #cbbfae;
	border-radius: 4px;
	background: #fff center / 12px 12px no-repeat;
	transition: border-color 0.2s ease, background-color 0.2s ease;
}
.noirmusk-mc-tester:hover .noirmusk-mc-tester__box {
	border-color: #a3703f;
}
.noirmusk-mc-tester.is-on .noirmusk-mc-tester__box {
	border-color: #a3703f;
	background-color: #a3703f;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='4.5 12.5 10 18 19.5 6.5'/%3E%3C/svg%3E");
}
.noirmusk-mc-tester__input:focus-visible ~ .noirmusk-mc-tester__box {
	outline: 2px solid #a3703f;
	outline-offset: 2px;
}

/* footer */
.noirmusk-minicart__foot {
	flex: none;
	padding: 20px 24px calc(24px + env(safe-area-inset-bottom));
	border-top: 1px solid #ece7de;
	background: #fbf8f2;
}
.noirmusk-minicart__subtotal {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	font-family: var(--theme-heading-font-family);
	font-size: 20px;
	color: #1a1a1a;
}
.noirmusk-minicart__subtotal strong {
	font-size: 24px;
	font-weight: 700;
}
.noirmusk-minicart__row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	margin-top: 8px;
	font-size: 15px;
	color: #4a463f;
}
.noirmusk-minicart__note {
	margin: 6px 0 18px;
	font-size: 13px;
	line-height: 1.5;
	color: #8a8378;
}
.noirmusk-minicart .noirmusk-minicart__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	box-sizing: border-box;
	margin: 0;
	padding: 15px 20px;
	border: 1px solid #1a1a1a;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.1em;
	line-height: 1.3;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}
.noirmusk-minicart .noirmusk-minicart__btn--dark {
	background: #1a1a1a;
	color: #fff;
}
.noirmusk-minicart .noirmusk-minicart__btn--dark:hover {
	border-color: #a3703f;
	background: #a3703f;
	color: #fff;
}
.noirmusk-minicart .noirmusk-minicart__btn--light {
	margin-top: 10px;
	background: transparent;
	color: #1a1a1a;
}
.noirmusk-minicart .noirmusk-minicart__btn--light:hover {
	background: #1a1a1a;
	color: #fff;
}

/* empty state */
.noirmusk-minicart__empty {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 40px 32px 80px;
	text-align: center;
}
.noirmusk-minicart__empty-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 76px;
	height: 76px;
	margin-bottom: 20px;
	border-radius: 50%;
	background: #f0e2cc;
	color: #a3703f;
}
.noirmusk-minicart__empty-title {
	margin: 0 0 8px;
	font-family: var(--theme-heading-font-family);
	font-size: 24px;
	font-weight: 700;
	color: #1a1a1a;
}
.noirmusk-minicart__empty-text {
	max-width: 280px;
	margin: 0 0 26px;
	font-size: 15px;
	line-height: 1.6;
	color: #6b665d;
}
.noirmusk-minicart__empty .noirmusk-minicart__btn {
	width: auto;
	min-width: 220px;
}

@media (max-width: 480px) {
	.noirmusk-minicart__panel {
		width: 100vw;
	}
	.noirmusk-minicart__head {
		padding: 18px 20px 16px;
	}
	.noirmusk-minicart__head h2 {
		font-size: 24px;
	}
	.noirmusk-minicart__scroll {
		padding: 4px 20px 16px;
	}
	.noirmusk-minicart__foot {
		padding: 18px 20px calc(20px + env(safe-area-inset-bottom));
	}
}
@media (prefers-reduced-motion: reduce) {
	.noirmusk-minicart,
	.noirmusk-minicart__overlay,
	.noirmusk-minicart__panel,
	.noirmusk-minicart.is-open .noirmusk-minicart__panel {
		transition: none;
	}
	.noirmusk-minicart.is-opening .noirmusk-mc-item,
	.noirmusk-minicart.is-opening .noirmusk-minicart__foot,
	.noirmusk-minicart.is-opening .noirmusk-minicart__empty {
		animation: none;
	}
}
