/*
 * Mark System — Header & Footer modernos
 */

.ms-container {
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 24px;
	box-sizing: border-box;
}

.skip-link {
	position: absolute; left: -9999px; top: 0;
}
.skip-link:focus {
	left: 0; top: 0; padding: 12px 16px; background: var(--ms-primary); color: #fff; z-index: 9999;
}

/* ============================================================
   HEADER
============================================================ */
.ms-header {
	position: sticky;
	top: 0;
	z-index: 1000;
	font-family: var(--ms-font);
	background: var(--ms-bg-white);
	transition: box-shadow 0.25s ease;
}

.ms-header.is-scrolled {
	box-shadow: 0 2px 16px rgba(29, 36, 32, 0.08);
}

/* topbar */
.ms-topbar {
	background: var(--ms-text);
	color: var(--ms-bg-white);
	font-size: 13px;
	font-weight: 500;
}

.ms-topbar__inner {
	display: flex;
	justify-content: space-between;
	align-items: center;
	min-height: 36px;
	gap: 24px;
}

.ms-topbar__contact {
	display: flex;
	gap: 24px;
	align-items: center;
	flex-wrap: wrap;
}

.ms-topbar .ms-topbar__link,
.ms-topbar a.ms-topbar__link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--ms-bg-white) !important;
	text-decoration: none;
	transition: color 0.15s ease;
}

.ms-topbar .ms-topbar__link span {
	color: var(--ms-bg-white) !important;
}

.ms-topbar .ms-topbar__link svg {
	color: var(--ms-bg-white);
	stroke: var(--ms-bg-white);
}

.ms-topbar .ms-topbar__link:hover,
.ms-topbar a.ms-topbar__link:hover {
	color: var(--ms-primary) !important;
}

.ms-topbar .ms-topbar__link:hover span {
	color: var(--ms-primary) !important;
}

.ms-topbar .ms-topbar__link:hover svg {
	color: var(--ms-primary);
	stroke: var(--ms-primary);
}

.ms-topbar__social {
	display: flex;
	gap: 12px;
	align-items: center;
}

.ms-topbar .ms-topbar__social a,
.ms-topbar__social a {
	color: var(--ms-bg-white) !important;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	transition: background 0.15s ease, color 0.15s ease;
}

.ms-topbar .ms-topbar__social a svg {
	fill: var(--ms-bg-white);
}

.ms-topbar__social a:hover {
	background: var(--ms-primary);
	color: var(--ms-bg-white);
}

@media (max-width: 768px) {
	.ms-topbar { display: none; }
}

/* main row */
.ms-header__main {
	background: var(--ms-bg-white);
	border-bottom: 1px solid #f0f1f3;
}

.ms-header.is-scrolled .ms-header__main {
	border-bottom-color: transparent;
}

.ms-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 80px;
	gap: 24px;
}

.ms-header.is-scrolled .ms-header__inner {
	min-height: 64px;
}

.ms-header__logo {
	flex-shrink: 0;
	display: block;
	transition: transform 0.2s ease;
}

.ms-header__logo img {
	height: 56px;
	width: auto;
	display: block;
	transition: height 0.2s ease;
}

.ms-header.is-scrolled .ms-header__logo img {
	height: 44px;
}

/* nav */
.ms-header__nav {
	flex: 1;
	display: flex;
	justify-content: center;
}

.ms-menu {
	display: flex;
	gap: 4px;
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: 15px;
	font-weight: 500;
}

.ms-menu li {
	position: relative;
}

.ms-menu > li > a {
	color: var(--ms-text);
	padding: 8px 14px;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	text-decoration: none;
	border-radius: 6px;
	transition: color 0.15s ease, background 0.15s ease;
	white-space: nowrap;
}

.ms-menu > li > a:hover,
.ms-menu > li.current-menu-item > a,
.ms-menu > li.current-menu-parent > a,
.ms-menu > li.current-product-parent > a {
	color: var(--ms-primary);
	background: rgba(173, 6, 55, 0.06);
}

.ms-menu > li.menu-item-has-children > a::after {
	content: "";
	display: inline-block;
	width: 8px; height: 8px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg) translateY(-2px);
	margin-left: 4px;
	transition: transform 0.2s ease;
}

.ms-menu > li.menu-item-has-children:hover > a::after {
	transform: rotate(225deg) translateY(2px);
}

/* dropdown */
.ms-menu .sub-menu {
	position: absolute;
	top: calc(100% + 2px);
	left: 0;
	min-width: 240px;
	background: var(--ms-bg-white);
	border: 1px solid #eef0f2;
	border-radius: 8px;
	box-shadow: 0 12px 32px rgba(29, 36, 32, 0.12);
	padding: 8px;
	list-style: none;
	margin: 0;
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
	pointer-events: none;
}

.ms-menu li:hover > .sub-menu,
.ms-menu li:focus-within > .sub-menu,
.ms-menu li.is-open > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
	pointer-events: auto;
}

.ms-menu > li.menu-item-has-children.is-open > a::after {
	transform: rotate(225deg) translateY(2px);
}

.ms-menu .sub-menu li { display: block; }

.ms-menu .sub-menu a {
	display: block;
	padding: 9px 14px;
	font-size: 14px;
	color: var(--ms-text);
	border-radius: 4px;
	text-decoration: none;
	transition: background 0.12s ease, color 0.12s ease;
}

.ms-menu .sub-menu a:hover {
	background: rgba(173, 6, 55, 0.08);
	color: var(--ms-primary);
}

/* actions */
.ms-header__actions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}

.ms-icon-btn {
	background: transparent;
	border: none;
	cursor: pointer;
	width: 40px; height: 40px;
	border-radius: 8px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--ms-text);
	transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.ms-icon-btn:hover {
	background: rgba(29, 36, 32, 0.06);
	color: var(--ms-primary);
}

/* Search toggle: lupa grande sin fondo */
.ms-header .ms-search-toggle,
button.ms-search-toggle {
	background: transparent !important;
	background-color: transparent !important;
	border: none !important;
	width: 44px;
	height: 44px;
	padding: 6px;
	color: var(--ms-text) !important;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: color 0.15s ease, transform 0.15s ease;
	box-shadow: none !important;
	outline: none;
}

.ms-header .ms-search-toggle svg,
button.ms-search-toggle svg {
	width: 26px !important;
	height: 26px !important;
	display: block !important;
	color: inherit !important;
	stroke: currentColor !important;
	fill: none !important;
	visibility: visible !important;
	opacity: 1 !important;
}

.ms-header .ms-search-toggle:hover,
button.ms-search-toggle:hover,
.ms-header .ms-search-toggle:focus,
button.ms-search-toggle:focus {
	background: transparent !important;
	background-color: transparent !important;
	color: var(--ms-primary) !important;
	transform: scale(1.12);
}

.ms-header .ms-search-toggle:hover svg,
button.ms-search-toggle:hover svg {
	color: var(--ms-primary) !important;
	stroke: var(--ms-primary) !important;
}

.ms-header .ms-search-toggle[aria-expanded="true"],
button.ms-search-toggle[aria-expanded="true"] {
	color: var(--ms-primary) !important;
}

.ms-header .ms-search-toggle[aria-expanded="true"] svg {
	color: var(--ms-primary) !important;
	stroke: var(--ms-primary) !important;
}

.ms-cta-quote {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--ms-primary);
	color: var(--ms-bg-white) !important;
	font-weight: 700;
	font-size: 13px;
	padding: 11px 22px;
	border-radius: 6px;
	text-decoration: none;
	transition: background 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
	letter-spacing: 1.2px;
	text-transform: uppercase;
}

.ms-cta-quote:hover {
	background: var(--ms-primary-hover);
	transform: translateY(-1px);
	box-shadow: 0 6px 14px rgba(173, 6, 55, 0.3);
}

/* hamburger */
.ms-mobile-toggle { display: none; }

.ms-burger {
	display: inline-flex;
	flex-direction: column;
	justify-content: center;
	width: 22px;
	height: 18px;
	gap: 4px;
}
.ms-burger span {
	display: block;
	height: 2px;
	background: currentColor;
	border-radius: 1px;
	transition: transform 0.25s ease, opacity 0.25s ease;
	transform-origin: center;
}
.ms-mobile-toggle[aria-expanded="true"] .ms-burger span:nth-child(1) {
	transform: translateY(6px) rotate(45deg);
}
.ms-mobile-toggle[aria-expanded="true"] .ms-burger span:nth-child(2) {
	opacity: 0;
}
.ms-mobile-toggle[aria-expanded="true"] .ms-burger span:nth-child(3) {
	transform: translateY(-6px) rotate(-45deg);
}

/* ============================================================
   SEARCH PANEL — overlay limpio, centrado
============================================================ */
.ms-search-panel {
	background: rgba(29, 36, 32, 0.97);
	backdrop-filter: blur(8px);
	overflow: hidden;
	max-height: 0;
	transition: max-height 0.3s ease, padding 0.3s ease;
	position: relative;
}

.ms-search-panel:not([hidden]) {
	display: block;
	padding: 28px 0;
	max-height: 220px;
}

.ms-search-panel .ms-container {
	max-width: 820px;
}

.ms-search-form {
	display: flex;
	align-items: stretch;
	gap: 10px;
	position: relative;
}

/* INPUT — protagonista del panel */
.ms-search-panel .ms-search-input,
.ms-search-input {
	flex: 1;
	background: var(--ms-bg-white) !important;
	border: 2px solid transparent !important;
	color: var(--ms-text) !important;
	font-size: 17px;
	padding: 14px 22px;
	border-radius: 10px;
	outline: none;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	min-width: 0;
}

.ms-search-input::placeholder {
	color: #98a0a7 !important;
	opacity: 1 !important;
}

.ms-search-input:focus {
	border-color: var(--ms-primary) !important;
	box-shadow: 0 0 0 3px rgba(173, 6, 55, 0.25), 0 4px 20px rgba(0, 0, 0, 0.18);
}

/* BOTÓN BUSCAR — primario (rojo) */
.ms-search-panel .ms-search-submit,
button.ms-search-submit {
	background: var(--ms-primary) !important;
	color: var(--ms-bg-white) !important;
	border: 2px solid var(--ms-primary) !important;
	padding: 0 22px;
	border-radius: 10px;
	font-weight: 600;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	letter-spacing: 0.3px;
	transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
	box-shadow: 0 4px 12px rgba(173, 6, 55, 0.35);
	white-space: nowrap;
}

.ms-search-panel .ms-search-submit:hover,
button.ms-search-submit:hover {
	background: var(--ms-primary-hover) !important;
	border-color: var(--ms-primary-hover) !important;
	transform: translateY(-1px);
	box-shadow: 0 6px 18px rgba(173, 6, 55, 0.5);
}

.ms-search-submit svg {
	stroke: currentColor;
}

/* BOTÓN CERRAR — discreto, secundario */
.ms-search-panel .ms-search-close,
button.ms-search-close {
	background: transparent !important;
	border: 2px solid rgba(255, 255, 255, 0.2) !important;
	color: rgba(255, 255, 255, 0.6) !important;
	font-size: 22px;
	font-weight: 300;
	width: 48px;
	min-width: 48px;
	height: auto;
	cursor: pointer;
	border-radius: 10px;
	transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
	box-shadow: none !important;
	padding: 0;
	line-height: 1;
}

.ms-search-panel .ms-search-close:hover,
button.ms-search-close:hover {
	color: var(--ms-bg-white) !important;
	border-color: rgba(255, 255, 255, 0.5) !important;
	background: rgba(255, 255, 255, 0.06) !important;
}

@media (max-width: 600px) {
	.ms-search-form { gap: 6px; }
	.ms-search-input { font-size: 15px; padding: 12px 16px; }
	.ms-search-submit span { display: none; }
	.ms-search-submit { padding: 0 16px; }
}

/* ============================================================
   MOBILE DRAWER
============================================================ */
.ms-mobile-drawer {
	position: fixed;
	top: 0; right: 0; bottom: 0;
	width: min(360px, 86vw);
	background: var(--ms-bg-white);
	z-index: 1200;
	transform: translateX(100%);
	transition: transform 0.3s ease;
	display: flex;
	flex-direction: column;
	box-shadow: -8px 0 32px rgba(0,0,0,0.15);
}

.ms-mobile-drawer:not([hidden]) {
	display: flex;
	transform: translateX(0);
}

.ms-mobile-drawer[hidden] {
	display: flex !important;
	transform: translateX(100%);
	pointer-events: none;
}

.ms-mobile-drawer__inner {
	flex: 1;
	display: flex;
	flex-direction: column;
	padding: 20px;
	overflow-y: auto;
}

.ms-mobile-drawer__head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 24px;
	padding-bottom: 16px;
	border-bottom: 1px solid #eef0f2;
}

.ms-mobile-drawer__logo img { height: 44px; width: auto; display: block; }

.ms-mobile-drawer__close {
	background: rgba(29, 36, 32, 0.06);
	border: none;
	cursor: pointer;
	width: 40px; height: 40px;
	border-radius: 8px;
	font-size: 28px;
	color: var(--ms-text);
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.ms-mobile-drawer__nav { margin-bottom: 24px; }

.ms-mobile-menu {
	list-style: none;
	margin: 0; padding: 0;
}

.ms-mobile-menu > li { border-bottom: 1px solid #f3f4f6; }

.ms-mobile-menu a {
	display: block;
	padding: 14px 0;
	font-size: 16px;
	font-weight: 500;
	color: var(--ms-text);
	text-decoration: none;
}

.ms-mobile-menu li.menu-item-has-children > a {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.ms-mobile-menu li.menu-item-has-children > a::after {
	content: "▾";
	color: var(--ms-text-soft);
	font-size: 12px;
	transition: transform 0.2s ease;
}

.ms-mobile-menu li.is-open > a::after { transform: rotate(180deg); }

.ms-mobile-menu .sub-menu {
	list-style: none;
	margin: 0;
	padding: 0 0 8px 16px;
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.3s ease;
}

.ms-mobile-menu li.is-open > .sub-menu { max-height: 800px; }

.ms-mobile-menu .sub-menu a {
	padding: 10px 0;
	font-size: 14px;
	font-weight: 400;
	color: var(--ms-text-soft);
	border-bottom: none;
}

.ms-mobile-drawer__cta {
	margin-bottom: 24px;
	text-align: center;
	width: 100%;
}

.ms-mobile-drawer__contact {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 20px;
	padding: 16px;
	background: #fafafa;
	border-radius: 8px;
}

.ms-mobile-drawer__contact-item {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--ms-text);
	text-decoration: none;
	font-size: 14px;
	font-weight: 500;
}

.ms-mobile-drawer__contact-item svg { color: var(--ms-primary); flex-shrink: 0; }

.ms-mobile-drawer__social {
	display: flex;
	gap: 12px;
	justify-content: center;
}

.ms-mobile-drawer__social a {
	width: 40px; height: 40px;
	background: rgba(29, 36, 32, 0.06);
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--ms-text);
	transition: background 0.15s ease, color 0.15s ease;
}

.ms-mobile-drawer__social a:hover {
	background: var(--ms-primary);
	color: var(--ms-bg-white);
}

/* overlay */
.ms-overlay {
	position: fixed;
	top: 0; left: 0; right: 0; bottom: 0;
	background: rgba(0,0,0,0.4);
	z-index: 1100;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s ease;
}
.ms-overlay.is-active {
	opacity: 1;
	pointer-events: auto;
}

/* responsive */
@media (max-width: 1024px) {
	.ms-header__nav { display: none; }
	.ms-search-toggle { display: none; }
	.ms-cta-quote span { display: none; }
	.ms-cta-quote { padding: 10px 12px; }
	.ms-mobile-toggle { display: inline-flex; }
}

@media (max-width: 600px) {
	.ms-header__inner { min-height: 64px; gap: 12px; }
	.ms-header__logo img { height: 40px; }
	.ms-cta-quote { display: none; }
}

/* ============================================================
   FOOTER
============================================================ */
.ms-footer {
	background: var(--ms-text);
	color: rgba(255, 255, 255, 0.85);
	font-family: var(--ms-font);
	margin-top: 0;
}

.ms-footer__top {
	padding: 64px 0 40px;
}

.ms-footer__grid {
	display: grid;
	grid-template-columns: 1.7fr 1fr 1fr 1.2fr;
	gap: 40px;
}

@media (max-width: 1024px) {
	.ms-footer__grid {
		grid-template-columns: 1fr 1fr;
	}
	.ms-footer__col--brand { grid-column: 1 / -1; }
	.ms-footer__col--contact { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
	.ms-footer__grid { grid-template-columns: 1fr; gap: 32px; }
}

.ms-footer__logo { display: block; margin-bottom: 16px; }
.ms-footer__logo img { height: 50px; width: auto; display: block; }

.ms-footer__tagline {
	color: var(--ms-bg-white);
	font-weight: 600;
	font-size: 15px;
	margin: 0 0 12px;
}

.ms-footer__desc {
	font-size: 14px;
	line-height: 1.6;
	margin: 0 0 20px;
	max-width: 360px;
	color: rgba(255, 255, 255, 0.7);
}

.ms-footer__social {
	display: flex;
	gap: 10px;
}

.ms-footer__social a {
	width: 36px; height: 36px;
	background: rgba(255, 255, 255, 0.08);
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--ms-bg-white);
	transition: background 0.15s ease, transform 0.15s ease;
}

.ms-footer__social a:hover {
	background: var(--ms-primary);
	transform: translateY(-2px);
	color: var(--ms-bg-white);
}

.ms-footer__social a:hover svg {
	color: var(--ms-bg-white);
	fill: var(--ms-bg-white);
}

.ms-footer .ms-footer__heading {
	color: var(--ms-bg-white) !important;
	font-size: 16px !important;
	font-weight: 700 !important;
	letter-spacing: 1.4px !important;
	line-height: 1.3 !important;
	text-transform: uppercase !important;
	margin: 0 0 18px !important;
}

.ms-footer__list {
	list-style: none;
	margin: 0; padding: 0;
}

.ms-footer__list li { margin-bottom: 8px; }

.ms-footer__list a {
	color: rgba(255, 255, 255, 0.7);
	text-decoration: none;
	font-size: 14px;
	transition: color 0.15s ease, padding-left 0.15s ease;
	display: inline-block;
}

.ms-footer__list a:hover {
	color: var(--ms-primary);
	padding-left: 4px;
}

.ms-footer__list-cta a {
	color: var(--ms-primary) !important;
	font-weight: 600;
	margin-top: 8px;
	display: inline-block;
}

.ms-footer__contact-list {
	list-style: none;
	margin: 0 0 24px;
	padding: 0;
}

.ms-footer__contact-list li {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	margin-bottom: 12px;
	font-size: 14px;
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.8);
}

.ms-footer__contact-list svg { color: var(--ms-primary); flex-shrink: 0; margin-top: 3px; }

.ms-footer__contact-list a {
	color: inherit;
	text-decoration: none;
	transition: color 0.15s ease;
}

.ms-footer__contact-list a:hover { color: var(--ms-primary); }

/* Link "Cómo llegar ↗" debajo de la dirección */
.ms-footer__map-link {
	display: inline-block;
	margin-top: 6px;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--ms-primary) !important;
	text-decoration: none !important;
	letter-spacing: 0.3px;
	transition: opacity 0.15s ease, transform 0.15s ease;
}

.ms-footer__map-link:hover {
	color: var(--ms-primary) !important;
	opacity: 0.8;
	transform: translateX(2px);
}

/* newsletter */
.ms-newsletter label {
	display: block;
	font-size: 13px;
	color: rgba(255, 255, 255, 0.7);
	margin-bottom: 8px;
	line-height: 1.4;
}

.ms-newsletter__row {
	display: flex;
	gap: 0;
	background: rgba(255, 255, 255, 0.08);
	border-radius: 6px;
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.1);
	transition: border-color 0.15s ease;
}

.ms-newsletter__row:focus-within { border-color: var(--ms-primary); }

.ms-newsletter input {
	flex: 1;
	background: transparent;
	border: none;
	color: var(--ms-bg-white);
	padding: 11px 14px;
	font-size: 14px;
	outline: none;
	min-width: 0;
}

.ms-newsletter input::placeholder { color: rgba(255, 255, 255, 0.4); }

.ms-newsletter button {
	background: var(--ms-primary);
	color: var(--ms-bg-white);
	border: none;
	padding: 11px 14px;
	cursor: pointer;
	transition: background 0.15s ease;
	display: inline-flex;
	align-items: center;
}

.ms-newsletter button:hover { background: var(--ms-primary-hover); }

/* bottom */
.ms-footer__bottom {
	background: rgba(0, 0, 0, 0.25);
	padding: 18px 0;
	font-size: 13px;
}

.ms-footer__bottom-inner {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 20px;
	flex-wrap: wrap;
	color: rgba(255, 255, 255, 0.55);
	text-align: center;
}

.ms-footer__bottom-links {
	display: flex;
	gap: 12px;
	align-items: center;
}

.ms-footer__bottom-links a {
	color: rgba(255, 255, 255, 0.7);
	text-decoration: none;
	transition: color 0.15s ease;
}

.ms-footer__bottom-links a:hover { color: var(--ms-primary); }

.ms-footer__copyright { margin: 0; }

@media (max-width: 600px) {
	.ms-footer__bottom-inner { justify-content: center; text-align: center; }
}

/* ============================================================
   Body adjustments
============================================================ */
body { padding-top: 0 !important; }

/* Hide Elementor template header/footer if both still active */
body .elementor-location-header[data-elementor-id="42"] { display: none; }
body .elementor-location-footer[data-elementor-id="44"] { display: none; }

/* Disable scroll when drawer is open */
body.ms-drawer-open { overflow: hidden; }

/* ============================================================
   BOTÓN VOLVER ARRIBA — flotante bottom-right
============================================================ */
.ms-back-to-top {
	position: fixed;
	right: 24px;
	bottom: 110px; /* arriba del WhatsApp pero sin tanto espacio */
	width: 48px;
	height: 48px;
	border-radius: 50%;
	border: none;
	background: var(--ms-primary);
	color: var(--ms-bg-white);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 6px 20px rgba(173, 6, 55, 0.45), 0 2px 6px rgba(29, 36, 32, 0.18);
	z-index: 999;
	opacity: 0;
	transform: translateY(16px) scale(0.8);
	pointer-events: none;
	transition: opacity 0.25s ease, transform 0.25s ease, background 0.2s ease, box-shadow 0.25s ease;
	font-family: var(--ms-font);
}

.ms-back-to-top[hidden] {
	display: flex !important;
	visibility: hidden;
}

.ms-back-to-top.is-visible {
	opacity: 1;
	transform: translateY(0) scale(1);
	pointer-events: auto;
	visibility: visible;
}

.ms-back-to-top:hover,
.ms-back-to-top:focus {
	background: var(--ms-primary-hover);
	transform: translateY(-3px) scale(1.06);
	box-shadow: 0 10px 28px rgba(173, 6, 55, 0.55), 0 4px 10px rgba(29, 36, 32, 0.25);
	outline: none;
}

.ms-back-to-top:active {
	transform: translateY(0) scale(1);
}

@media (max-width: 600px) {
	.ms-back-to-top {
		right: 18px;
		bottom: 96px;
		width: 44px;
		height: 44px;
	}
}
