/* Isolated MaStore dock + mobile catalog sheet. Black/white, no mega. */

.msd {
	--msd-bg: #ffffff;
	--msd-ink: #111111;
	--msd-line: #ececec;
	--msd-soft: #f4f4f5;
	--msd-in: cubic-bezier(0.32, 0.72, 0, 1);
	--msd-out: cubic-bezier(0.4, 0, 1, 1);
	--msd-ease: cubic-bezier(0.23, 1, 0.32, 1);
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 90;
	padding: 6px 10px calc(6px + env(safe-area-inset-bottom, 0px));
	background: var(--msd-bg);
	border-top: 1px solid var(--msd-line);
	box-shadow: 0 -10px 32px rgba(0, 0, 0, 0.06);
	color: var(--msd-ink);
}

.msd__row {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	align-items: center;
	width: min(480px, 100%);
	margin: 0 auto;
}

.msd__item {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 48px;
	min-width: 48px;
	padding: 0;
	border: 0;
	border-radius: 16px;
	background: transparent;
	color: var(--msd-ink);
	text-decoration: none;
	cursor: pointer;
	appearance: none;
	-webkit-tap-highlight-color: transparent;
	transition: background 0.18s var(--msd-ease), color 0.18s var(--msd-ease), transform 0.16s var(--msd-ease);
}

.msd__item svg {
	display: block;
	width: 22px;
	height: 22px;
	pointer-events: none;
}

.msd__item:focus-visible {
	outline: none;
	box-shadow: 0 0 0 2px #fff, 0 0 0 4px #111;
}

.msd__item:active {
	transform: scale(0.94);
}

.msd__item.is-current,
.msd__item[aria-expanded="true"] {
	background: #111;
	color: #fff;
}

.msd-scrim {
	position: fixed;
	inset: 0;
	z-index: 300;
	background: rgba(0, 0, 0, 0.48);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.28s var(--msd-in), visibility 0.28s linear;
}

.msd-scrim.is-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transition: opacity 0.28s var(--msd-in);
}

.msd-scrim.is-leaving {
	opacity: 0;
	visibility: visible;
	pointer-events: none;
	transition: opacity 0.2s var(--msd-out);
}

.msd-sheet {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 310;
	max-height: calc(100dvh - 88px);
	visibility: hidden;
	pointer-events: none;
	transform: translate3d(0, 100%, 0);
	transition: transform 0.34s var(--msd-in) !important, visibility 0.34s linear !important;
}

.msd-sheet.is-open {
	visibility: visible;
	pointer-events: auto;
	transform: translate3d(0, 0, 0);
	transition: transform 0.34s var(--msd-in);
}

.msd-sheet.is-leaving {
	visibility: visible;
	pointer-events: none;
	transform: translate3d(0, 100%, 0);
	transition: transform 0.22s var(--msd-out);
}

.msd-sheet.is-dragging {
	transition: none;
}

.msd-sheet__panel {
	display: flex;
	flex-direction: column;
	max-height: calc(100dvh - 88px);
	padding: 4px 8px calc(10px + env(safe-area-inset-bottom, 0px));
	border: 1px solid var(--msd-line);
	border-bottom: 0;
	border-radius: 24px 24px 0 0;
	background: #fff;
	color: #111;
	box-shadow: 0 -16px 40px rgba(0, 0, 0, 0.14);
	overflow: hidden;
}

.msd-sheet__handle {
	width: 40px;
	height: 4px;
	margin: 6px auto 8px;
	border-radius: 999px;
	background: #d4d4d8;
}

.msd-sheet__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 0 10px 8px;
}

.msd-sheet__title {
	margin: 0;
	font-size: 11px;
	font-weight: 750;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: #111;
	text-decoration: none;
}

a.msd-sheet__title:active {
	opacity: 0.6;
}

.msd-sheet__link.is-all {
	font-weight: 750;
}

.msd-sheet__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border: 1px solid var(--msd-line);
	border-radius: 50%;
	background: #fff;
	color: #111;
	cursor: pointer;
	transition: background 0.18s var(--msd-ease), color 0.18s var(--msd-ease), transform 0.16s var(--msd-ease);
}

.msd-sheet__close:active {
	transform: scale(0.94);
	background: #111;
	color: #fff;
}

.msd-sheet__nav {
	min-height: 0;
	overflow: auto;
	-webkit-overflow-scrolling: touch;
}

.msd-sheet__list {
	margin: 0;
	padding: 0 4px 8px;
	list-style: none;
}

.msd-sheet__link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 46px;
	padding: 0 12px;
	border-radius: 14px;
	color: #111;
	font-size: 16px;
	font-weight: 600;
	letter-spacing: -0.02em;
	text-decoration: none;
	transition: background 0.16s var(--msd-ease), transform 0.16s var(--msd-ease);
}

.msd-sheet__link.is-sale {
	font-weight: 700;
}

.msd-sheet__link svg {
	color: #a1a1aa;
	flex: 0 0 auto;
}

.msd-sheet__link:active {
	background: var(--msd-soft);
	transform: scale(0.985);
}

@media (min-width: 901px) {
	.msd,
	.msd-scrim,
	.msd-sheet,
	.msd-search {
		display: none !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.msd__item,
	.msd-sheet__close,
	.msd-sheet__link {
		transition: none;
	}
}

body:has(.msd) {
	padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 901px) {
	body:has(.msd) {
		padding-bottom: 0;
	}
}

body.msd-sheet-open,
body.msd-search-open {
	overflow: hidden;
}

body.msd-sheet-open .msd,
body.msd-search-open .msd {
	visibility: hidden;
	pointer-events: none;
}

body.msd-sheet-open .mlc-fab,
body.msd-sheet-open #mastore-live-chat,
body.msd-sheet-open #mastore-live-chat .mlc-fab,
body.msd-search-open .mlc-fab,
body.msd-search-open #mastore-live-chat,
body.msd-search-open #mastore-live-chat .mlc-fab {
	visibility: hidden !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

.msd-search {
	position: fixed;
	inset: 0;
	z-index: 320;
	visibility: hidden;
	pointer-events: none;
	transform: translate3d(0, 100%, 0);
}

.msd-search.is-open {
	visibility: visible;
	pointer-events: auto;
	transform: translate3d(0, 0, 0);
}

.msd-search__panel {
	display: flex;
	flex-direction: column;
	height: 100%;
	padding: 6px 16px calc(12px + env(safe-area-inset-bottom, 0px));
	background: #fff;
	color: #111;
}

.msd-search__handle {
	width: 40px;
	height: 4px;
	margin: 4px auto 10px;
	border-radius: 999px;
	background: #d4d4d8;
	flex: 0 0 auto;
}

.msd-search__form {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 0 0 auto;
}

.msd-search__field {
	position: relative;
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	min-height: 48px;
	padding: 0 12px 0 42px;
	border: 1px solid #ececec;
	border-radius: 999px;
	background: #f4f4f5;
}

.msd-search__field:focus-within {
	border-color: #111;
	background: #fff;
}

.msd-search__ico {
	position: absolute;
	left: 14px;
	top: 50%;
	display: grid;
	place-items: center;
	color: #737373;
	transform: translateY(-50%);
	pointer-events: none;
}

.msd-search__ico svg {
	width: 18px;
	height: 18px;
}

.msd-search__field input {
	width: 100%;
	height: 48px;
	border: 0;
	background: transparent;
	color: #111;
	font: inherit;
	font-size: 16px;
	letter-spacing: -0.02em;
	outline: none;
	appearance: none;
}

.msd-search__field input::-webkit-search-decoration,
.msd-search__field input::-webkit-search-cancel-button {
	-webkit-appearance: none;
}

.msd-search__clear,
.msd-search__x {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 1px solid #ececec;
	border-radius: 50%;
	background: #fff;
	color: #111;
	cursor: pointer;
	appearance: none;
}

.msd-search__clear {
	position: absolute;
	right: 6px;
	border: 0;
	background: #ececec;
}

.msd-search__clear[hidden] {
	display: none;
}

.msd-search__body {
	flex: 1 1 auto;
	min-height: 0;
	margin-top: 18px;
	overflow: auto;
	-webkit-overflow-scrolling: touch;
}

.msd-search__kicker {
	margin: 0 0 10px;
	color: #737373;
	font-size: 11px;
	font-weight: 750;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.msd-search__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 22px;
}

.msd-search__chip {
	height: 36px;
	padding: 0 14px;
	border: 1px solid #e7e7e7;
	border-radius: 999px;
	background: #fff;
	color: #111;
	font: inherit;
	font-size: 13px;
	font-weight: 650;
	cursor: pointer;
	appearance: none;
	transition: background 0.16s var(--msd-ease), color 0.16s var(--msd-ease), transform 0.16s var(--msd-ease);
}

.msd-search__chip:active {
	transform: scale(0.96);
	background: #111;
	color: #fff;
	border-color: #111;
}

.msd-search__wait,
.msd-search__empty {
	margin: 28px 0 0;
	color: #737373;
	font-size: 14px;
}

.msd-search__hits {
	display: grid;
	gap: 6px;
	padding-bottom: 24px;
}

.msd-search__more {
	width: 100%;
	min-height: 48px;
	margin: 12px 0 28px;
	border: 1px solid #111;
	border-radius: 14px;
	background: #111;
	color: #fff;
	font: inherit;
	font-size: 14px;
	font-weight: 750;
	letter-spacing: -0.01em;
	cursor: pointer;
	appearance: none;
	transition: transform 0.16s var(--msd-ease), background 0.16s var(--msd-ease), color 0.16s var(--msd-ease);
}

.msd-search__more:active {
	transform: scale(0.98);
	background: #fff;
	color: #111;
}

.msd-search__more[hidden] {
	display: none;
}

.msd-hit {
	display: grid;
	grid-template-columns: 56px minmax(0, 1fr);
	gap: 12px;
	align-items: center;
	padding: 8px;
	border-radius: 16px;
	color: inherit;
	text-decoration: none;
	opacity: 1;
	transform: translate3d(0, 0, 0);
	animation: msd-hit-in 0.38s var(--msd-in) both;
}

.msd-hit:active {
	background: #f4f4f5;
}

.msd-hit img {
	width: 56px;
	height: 70px;
	border-radius: 10px;
	object-fit: cover;
	background: #f4f4f5;
	display: block;
}

.msd-hit__ph {
	width: 56px;
	height: 70px;
	border-radius: 10px;
	background: #f4f4f5;
}

.msd-hit__brand {
	display: block;
	color: #737373;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.msd-hit__name {
	display: block;
	margin: 3px 0 4px;
	font-size: 14px;
	font-weight: 650;
	letter-spacing: -0.02em;
	line-height: 1.25;
}

.msd-hit__price {
	display: block;
	font-size: 13px;
	font-weight: 750;
}

.msd-hit.is-off .msd-hit__name {
	opacity: 0.55;
}

@keyframes msd-hit-in {
	to {
		opacity: 1;
		transform: translate3d(0, 0, 0);
	}
}

@media (prefers-reduced-motion: reduce) {
	.msd-hit {
		animation: none;
		opacity: 1;
		transform: none;
	}
}
