/* ==========================================================================
   Xiaomi Bulgaria – base, header (mi.com clone), product bar, buy popup
   ========================================================================== */

@font-face {
	font-family: "MiSans Latin";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("../fonts/misans-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "MiSans Latin";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("../fonts/misans-latin-ext.woff2") format("woff2");
	unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: "MiSans Latin";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("../fonts/misans-cyrillic.woff2") format("woff2");
	unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
	font-family: "MiSans Latin";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("../fonts/misans-cyrillic-ext.woff2") format("woff2");
	unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
	font-family: "Xiaomi Brand";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("../fonts/xiaomi-brand.woff2") format("woff2");
}

:root {
	--xm-primary: #ff6900;
	--xm-primary-hover: #ff781a;
	--xm-text: #191919;
	--xm-text-2: #8c8c8c;
	--xm-bg-base: #f7f7f7;
	--xm-border: #e8e8e8;
	--xm-header-h: 56px;
	--xm-pad-x: 32px;
	--xm-font: "MiSans Latin", "Helvetica Neue", Arial, sans-serif;
}

body {
	font-family: var(--xm-font);
	color: var(--xm-text);
	background: #fff;
}

a {
	color: inherit;
}
a:hover,
a:active {
	color: inherit;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* Neutralise the parent reset's coloured buttons inside our components. */
.xm-header button,
.xm-pbar button,
.xm-buy button {
	background: none;
	border: 0;
	border-radius: 0;
	color: inherit;
	font: inherit;
	padding: 0;
	white-space: normal;
}
.xm-header button:hover,
.xm-header button:focus,
.xm-pbar button:hover,
.xm-pbar button:focus,
.xm-buy button:hover,
.xm-buy button:focus {
	background: none;
	color: inherit;
}

.xm-header ul,
.xm-pbar ul,
.xm-buy ul,
.xm-footer ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.xm-header {
	position: relative;
	z-index: 100;
	height: var(--xm-header-h);
	background: #fff;
	box-shadow: 0 6px 16px rgba(25, 25, 25, 0.06);
	font-size: 14px;
	line-height: 1.5;
}

.xm-header__nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	box-sizing: content-box;
	max-width: 1500px;
	height: 100%;
	margin: 0 auto;
	padding: 0 var(--xm-pad-x);
}

.xm-header__left,
.xm-header__right {
	display: flex;
	align-items: center;
	height: 100%;
}

.xm-header__logo {
	display: block;
	flex-shrink: 0;
	width: 32px;
	height: 32px;
}
.xm-header__logo img {
	display: block;
	width: 100%;
	height: 100%;
}

.xm-menu {
	display: flex;
	align-items: center;
	height: 100%;
	margin-left: 24px !important;
}

.xm-menu__item {
	display: flex;
	align-items: center;
	height: 100%;
	padding: 0 24px;
}

.xm-menu__link {
	position: relative;
	display: flex !important;
	align-items: center;
	height: 100%;
	padding: 0 4px !important;
	font-size: 15px !important;
	font-weight: 400;
	color: var(--xm-text) !important;
	cursor: pointer;
	transition: color 0.25s ease-in-out;
}
.xm-menu__link::before {
	content: "";
	position: absolute;
	bottom: 0;
	left: 4px;
	width: 0;
	height: 2px;
	background: var(--xm-primary);
	transition: width 0.25s ease-in-out;
}
.xm-menu__item.is-active .xm-menu__link {
	color: var(--xm-primary) !important;
}
.xm-menu__item.is-active .xm-menu__link::before {
	width: calc(100% - 8px);
}
.xm-menu__arrow {
	display: none;
}

.xm-header__links {
	display: flex;
	align-items: center;
	gap: 36px;
}
.xm-header__links a {
	font-size: 15px;
	color: var(--xm-text);
	transition: color 0.25s;
}
.xm-header__links a:hover {
	color: var(--xm-primary);
}

/* Links duplicated into the drawer are mobile-only. */
.xm-menu > .menu-item {
	display: none;
}

.xm-header__promo {
	margin-left: 28px;
	padding: 8px 20px;
	border-radius: 10px;
	background: #ff6900;
	color: #fff !important;
	font-size: 15px;
	line-height: 1.2;
	white-space: nowrap;
	transition: background 0.25s;
}
.xm-header__promo:hover,
.xm-header__promo:focus-visible {
	background: #e65f00;
}

.xm-header__burger {
	display: none !important;
	font-size: 24px !important;
	width: 40px;
	height: 40px;
	align-items: center;
	justify-content: center;
}
.xm-header__burger svg {
	display: block;
}
.xm-header__burger-close {
	display: none;
}

/* Mega menu ---------------------------------------------------------------- */

.xm-mega {
	position: absolute;
	top: var(--xm-header-h);
	left: 0;
	z-index: 4;
	width: 100%;
	background: #fff;
	border-top: 1px solid rgba(0, 0, 0, 0.06);
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease, visibility 0.2s;
	cursor: default;
}
.xm-menu__item.is-active .xm-mega {
	visibility: visible;
	opacity: 1;
	pointer-events: auto;
}

.xm-mega__inner {
	display: flex;
	gap: 24px;
	box-sizing: content-box;
	max-width: 1500px;
	max-height: calc(90vh - var(--xm-header-h));
	margin: 0 auto;
	padding: 40px var(--xm-pad-x) 40px;
	overflow-y: auto;
}

.xm-mega__side {
	flex: 0 0 172px;
}

.xm-mega__group + .xm-mega__group {
	margin-top: 14px;
}

.xm-mega__group-title {
	display: flex !important;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 4px 0 !important;
	font-size: 14px !important;
	font-weight: 700 !important;
	text-align: left;
	color: var(--xm-text) !important;
	cursor: pointer;
}
.xm-mega__group-title i {
	display: flex;
	font-size: 16px;
	transition: transform 0.3s ease-in-out;
}
.xm-mega__group.is-open .xm-mega__group-title i {
	transform: rotate(180deg);
}
.xm-mega__group.has-current .xm-mega__group-title,
.xm-mega__group-title.is-current {
	color: var(--xm-primary) !important;
}

.xm-mega__subs {
	display: none;
	padding: 6px 0 0 12px !important;
}
.xm-mega__group.is-open .xm-mega__subs {
	display: block;
}
.xm-mega__subs .xm-mega__sub {
	display: block !important;
	width: 100%;
	padding: 6px 0 !important;
	font-size: 14px !important;
	text-align: left;
	color: var(--xm-text) !important;
	cursor: pointer;
	transition: color 0.2s;
}
.xm-mega__subs .xm-mega__sub:hover,
.xm-mega__subs .xm-mega__sub.is-current {
	color: var(--xm-primary) !important;
}

.xm-mega__panels {
	flex: 1;
	min-width: 0;
}
.xm-mega__panel {
	display: none;
}
.xm-mega__panel.is-current {
	display: block;
}

.xm-mega__cards {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 20px;
}

.xm-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	height: 100%;
	padding: 32px 16px 36px;
	background: var(--xm-bg-base);
	border-radius: 12px;
	text-align: center;
	transition: background-color 0.2s;
}
.xm-card:hover {
	background: #f0f0f0;
}
.xm-card__img {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 150px;
	margin-bottom: 36px;
}
.xm-card__img img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	transition: transform 0.3s ease;
}
.xm-card:hover .xm-card__img img {
	transform: scale(1.04);
}
.xm-card__name {
	font-size: 13px;
	line-height: 1.4;
	color: var(--xm-text);
}

.xm-mega__empty {
	margin: 0;
	padding: 40px 0;
	font-size: 15px;
	color: var(--xm-text-2);
}

.xm-header__mask {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	height: 100vh;
	z-index: 2;
	background: rgba(0, 0, 0, 0.2);
	-webkit-backdrop-filter: blur(20px);
	backdrop-filter: blur(20px);
	visibility: hidden;
	opacity: 0;
	transition: opacity 0.2s ease, visibility 0.2s;
}
.xm-header.is-open .xm-header__mask {
	visibility: visible;
	opacity: 1;
}

@media (max-width: 1439px) {
	.xm-menu__item {
		padding: 0 16px;
	}
	.xm-mega__cards {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}
@media (max-width: 1199px) {
	.xm-menu__item {
		padding: 0 12px;
	}
	.xm-header__links {
		gap: 24px;
	}
}

/* Mobile header + drawer --------------------------------------------------- */

@media (max-width: 1023px) {
	:root {
		--xm-header-h: 48px;
		--xm-pad-x: 16px;
	}

	.xm-header__logo {
		width: 28px;
		height: 28px;
	}

	.xm-header__links {
		display: none;
	}

	.xm-header__burger {
		display: inline-flex !important;
	}
	.xm-header__promo {
		margin: 0 8px 0 0;
		padding: 6px 14px;
		font-size: 14px;
	}
	.xm-header.is-drawer {
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
	}
	.xm-header.is-drawer .xm-header__burger-open {
		display: none;
	}
	.xm-header.is-drawer .xm-header__burger-close {
		display: block;
	}

	.xm-menu {
		position: fixed;
		top: var(--xm-header-h);
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 5;
		display: block;
		height: auto;
		margin-left: 0 !important;
		padding: 8px var(--xm-pad-x) 40px !important;
		overflow-x: hidden;
		background: #fff;
		border-top: 1px solid rgba(0, 0, 0, 0.06);
		overflow-y: auto;
		visibility: hidden;
		opacity: 0;
		transition: opacity 0.2s, visibility 0.2s;
	}
	.xm-header.is-drawer .xm-menu {
		visibility: visible;
		opacity: 1;
	}

	.xm-menu__item,
	.xm-menu__item:first-child {
		display: block;
		height: auto;
		padding: 0;
		border-bottom: 1px solid var(--xm-border);
	}

	.xm-menu__link {
		justify-content: space-between;
		width: 100%;
		height: 56px;
		padding: 0 !important;
		font-size: 16px !important;
		font-weight: 500;
	}
	.xm-menu__link::before {
		display: none;
	}
	.xm-menu__arrow {
		display: flex;
		font-size: 18px;
		transition: transform 0.3s;
	}
	.xm-menu__item.is-active .xm-menu__arrow {
		transform: rotate(180deg);
	}

	.xm-mega {
		position: static;
		display: none;
		border: 0;
		visibility: visible;
		opacity: 1;
		pointer-events: auto;
		transition: none;
	}
	.xm-menu__item.is-active .xm-mega {
		display: block;
	}

	.xm-mega__inner {
		display: block;
		max-height: none;
		padding: 0 0 16px;
		overflow: visible;
	}

	.xm-mega__side {
		display: flex;
		flex-wrap: wrap;
		gap: 8px;
		margin-bottom: 16px;
	}
	.xm-mega__group,
	.xm-mega__group + .xm-mega__group {
		display: contents;
		margin: 0;
	}
	.xm-mega__group > .xm-mega__group-title:not(.xm-mega__sub) {
		display: none !important;
	}
	.xm-mega__subs,
	.xm-mega__group.is-open .xm-mega__subs {
		display: contents;
	}
	.xm-mega__subs li {
		display: contents;
	}
	.xm-mega__sub,
	.xm-mega__subs .xm-mega__sub,
	.xm-mega__group-title.xm-mega__sub {
		display: inline-flex !important;
		width: auto;
		padding: 6px 14px !important;
		font-size: 13px !important;
		font-weight: 400 !important;
		border-radius: 999px;
		background: var(--xm-bg-base) !important;
		color: var(--xm-text) !important;
	}
	.xm-mega__sub.is-current,
	.xm-mega__subs .xm-mega__sub.is-current,
	.xm-mega__group-title.xm-mega__sub.is-current {
		background: var(--xm-text) !important;
		color: #fff !important;
	}

	.xm-mega__cards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 10px;
	}
	.xm-card {
		padding: 20px 10px 18px;
	}
	.xm-card__img {
		height: 110px;
		margin-bottom: 14px;
	}
	.xm-mega__empty {
		padding: 8px 0 16px;
	}

	.xm-menu > .menu-item {
		display: block;
		border-bottom: 1px solid var(--xm-border);
	}
	.xm-menu > .menu-item > a {
		display: flex;
		align-items: center;
		height: 56px;
		font-size: 16px;
		font-weight: 500;
	}

	.xm-header__mask {
		display: none;
	}

	body.xm-no-scroll {
		overflow: hidden;
	}
}

/* --------------------------------------------------------------------------
   Product bar (sticky, mi.com "xm-navbar")
   -------------------------------------------------------------------------- */

.xm-pbar {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(255, 255, 255, 0.8);
	-webkit-backdrop-filter: blur(5px);
	backdrop-filter: blur(5px);
}
.admin-bar .xm-pbar {
	top: 32px;
}

.xm-pbar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	box-sizing: content-box;
	max-width: 1440px;
	height: 64px;
	margin: 0 auto;
	padding: 0 40px;
}

.xm-pbar__left {
	display: flex;
	align-items: baseline;
	min-width: 0;
	overflow: hidden;
	white-space: nowrap;
}

.xm-pbar__title {
	margin: 0;
	font-size: 24px;
	font-weight: 600;
	line-height: 1.3;
	color: #333;
	overflow: hidden;
	text-overflow: ellipsis;
}

.xm-pbar__related {
	display: flex;
	align-items: baseline;
	font-size: 14px;
}
.xm-pbar__related li {
	display: flex;
	align-items: baseline;
}
.xm-pbar__related li::before {
	content: "|";
	padding: 0 10px 0 14px;
	color: #8c8c8c;
	font-size: 13px;
}
.xm-pbar__related li + li::before {
	padding-left: 10px;
}
.xm-pbar__related a {
	color: #8c8c8c;
	transition: color 0.2s;
}
.xm-pbar__related a:hover {
	color: var(--xm-primary);
}

.xm-pbar__nav {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	gap: 26px;
}
.xm-pbar__nav a:not(.xm-btn-buy) {
	font-size: 15px;
	color: #8c8c8c;
}
.xm-pbar__nav a.is-current {
	font-weight: 700;
	color: var(--xm-text);
}

.xm-btn-buy {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	height: 34px;
	padding: 0 22px !important;
	border-radius: 999px !important;
	background: var(--xm-primary) !important;
	color: #fff !important;
	font-size: 14px !important;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.2s;
}
.xm-btn-buy:hover,
.xm-btn-buy:focus-visible {
	background: var(--xm-primary-hover) !important;
	color: #fff !important;
}

/* POCO variant (mi.com xm-navbar--poco). */
.xm-pbar--poco {
	background: rgba(1, 2, 3, 0.92);
}
.xm-pbar--poco .xm-pbar__title,
.xm-pbar--poco .xm-pbar__nav a.is-current {
	color: #fff;
}
.xm-pbar--poco .xm-btn-buy {
	background: #ffd400 !important;
	color: #010203 !important;
	font-weight: 800;
}
.xm-pbar--poco .xm-btn-buy:hover {
	background: #ffe033 !important;
}

@media (max-width: 1023px) {
	.xm-pbar__inner {
		height: 52px;
		padding: 0 16px;
		gap: 12px;
	}
	.xm-pbar__title {
		font-size: 17px;
	}
	.xm-pbar__related {
		font-size: 12px;
	}
	.xm-pbar__related li::before {
		padding: 0 6px 0 8px;
	}
	.xm-pbar__nav {
		gap: 14px;
	}
	.xm-pbar__nav a:not(.xm-btn-buy) {
		font-size: 13px;
	}
	.xm-btn-buy {
		height: 30px;
		padding: 0 16px !important;
		font-size: 13px !important;
	}
}
@media (max-width: 782px) {
	.admin-bar .xm-pbar {
		top: 46px;
	}
}
@media (max-width: 600px) {
	.admin-bar .xm-pbar {
		top: 0;
	}
	/* Small phones: related models go to their own line under the title. */
	.xm-pbar__left {
		flex-direction: column;
		align-items: flex-start;
		justify-content: center;
	}
	.xm-pbar__related li:first-child::before {
		display: none;
	}
	.xm-pbar__related li:first-child {
		padding-left: 0;
	}
}

/* --------------------------------------------------------------------------
   "Научи повече"
   -------------------------------------------------------------------------- */

.xm-learn {
	display: flex;
	justify-content: center;
	padding: 56px 16px 88px;
}

.xm-btn-outline {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 200px;
	padding: 13px 40px;
	border: 1px solid var(--xm-text);
	border-radius: 999px;
	font-size: 16px;
	color: var(--xm-text);
	transition: background-color 0.2s, color 0.2s;
}
.xm-btn-outline:hover,
.xm-btn-outline:focus-visible {
	background: var(--xm-text);
	color: #fff;
}

/* --------------------------------------------------------------------------
   Buy popup
   -------------------------------------------------------------------------- */

.xm-buy {
	width: min(760px, calc(100% - 32px));
	max-height: calc(100% - 32px);
	padding: 0;
	border: 0;
	border-radius: 20px;
	background: #fff;
	color: var(--xm-text);
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
	overflow: auto;
}
.xm-buy::backdrop {
	background: rgba(0, 0, 0, 0.45);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}
.xm-buy[open] {
	animation: xm-pop 0.22s ease-out;
}
@keyframes xm-pop {
	from {
		opacity: 0;
		transform: translateY(12px) scale(0.98);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

.xm-buy__box {
	position: relative;
	padding: 40px 40px 44px;
}

.xm-buy__close {
	position: absolute !important;
	top: 16px;
	right: 16px;
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50% !important;
	font-size: 22px !important;
	cursor: pointer;
	transition: background-color 0.2s !important;
}
.xm-buy__close:hover {
	background: var(--xm-bg-base) !important;
}
.xm-buy__close svg {
	display: block;
}

.xm-buy__title {
	margin: 0 40px 6px 0;
	font-size: 24px;
	font-weight: 600;
	line-height: 1.3;
}
.xm-buy__sub {
	margin: 0 0 28px;
	font-size: 14px;
	color: var(--xm-text-2);
}

.xm-buy__list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 14px;
}
.xm-buy__list li {
	flex: 0 0 calc((100% - 3 * 14px) / 4);
}

.xm-buy__partner {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 4 / 3;
	padding: 8px;
	border: 1px solid var(--xm-border);
	border-radius: 14px;
	background: #fff;
	transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.xm-buy__partner:hover,
.xm-buy__partner:focus-visible {
	border-color: var(--xm-primary);
	box-shadow: 0 6px 18px rgba(255, 105, 0, 0.12);
	transform: translateY(-2px);
}
.xm-buy__partner img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

@media (max-width: 600px) {
	.xm-buy__box {
		padding: 28px 18px 24px;
	}
	.xm-buy__title {
		font-size: 19px;
	}
	.xm-buy__sub {
		margin-bottom: 18px;
	}
	.xm-buy__list {
		gap: 10px;
	}
	.xm-buy__list li {
		flex-basis: calc((100% - 10px) / 2);
	}
}

/* --------------------------------------------------------------------------
   Footer (as on the current xiaomi-bulgaria.bg)
   -------------------------------------------------------------------------- */

.xm-footer {
	background: #373a41;
	color: #fff;
	padding: 30px 20px;
}
.xm-footer__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 28px;
	max-width: 1500px;
	margin: 0 auto;
}
.xm-footer__copy {
	margin: 0;
	font-size: 13px;
	font-weight: 300;
	color: #fff;
}
.xm-footer__links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 24px;
	font-size: 13px;
	font-weight: 300;
}
.xm-footer__links a {
	color: #fff;
	transition: color 0.3s;
}
.xm-footer__links a:hover {
	color: var(--xm-primary);
}
.xm-footer__social {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-left: auto !important;
}
.xm-footer__social a {
	display: block;
	color: #fff;
	transition: color 0.3s;
}
.xm-footer__social svg {
	display: block;
}
.xm-footer__fb:hover {
	color: #4267b2;
}
.xm-footer__ig:hover {
	color: #e1306c;
}

/* --------------------------------------------------------------------------
   404
   -------------------------------------------------------------------------- */

.xm-404 {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 120px 16px 140px;
	text-align: center;
}
.xm-404__code {
	margin: 0;
	font-size: 96px;
	font-weight: 700;
	line-height: 1;
	color: var(--xm-primary);
}
.xm-404__title {
	margin: 20px 0 10px;
	font-size: 28px;
	font-weight: 600;
}
.xm-404__text {
	margin: 0 0 32px;
	color: var(--xm-text-2);
}

/* --------------------------------------------------------------------------
   Scroll to top
   -------------------------------------------------------------------------- */

.xm-totop {
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 90;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #fff;
	color: var(--xm-text);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14);
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s, transform 0.2s;
}
.xm-totop:hover,
.xm-totop:focus-visible {
	background: var(--xm-primary);
	color: #fff;
	transform: translateY(-2px);
}
.xm-totop svg {
	display: block;
}
@media (max-width: 767px) {
	.xm-totop {
		right: 16px;
		bottom: 16px;
		width: 42px;
		height: 42px;
	}
}

.xm-totop[hidden] {
	display: none;
}

@media (max-width: 600px) {
	.xm-totop {
		width: 36px;
		height: 36px;
		opacity: 0.85;
	}
}

/* --------------------------------------------------------------------------
   Series list (mi.com product-list)
   -------------------------------------------------------------------------- */

.xm-plist {
	background: #f7f7f7;
	padding-bottom: 60px;
}

.xm-plist__crumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 0 12px;
	padding: 40px 32px 0;
	font-size: 16px;
	line-height: 24px;
	color: #5e5e5e;
}
.xm-plist__crumbs a {
	color: #5e5e5e;
}
.xm-plist__crumbs a:hover {
	color: var(--xm-primary);
}
.xm-plist__crumbs .is-current {
	color: var(--xm-text);
}

.xm-plist__title {
	margin: 0;
	padding-top: 60px !important;
	padding-bottom: 40px !important;
	padding: 0 32px;
	font-size: 36px;
	font-weight: 700;
	line-height: 40px;
	color: var(--xm-text);
}

.xm-plist__bar {
	display: flex;
	align-items: center;
	gap: 40px;
	padding: 40px 32px 32px;
	font-size: 24px;
	line-height: 30px;
}

.xm-plist__cats {
	position: relative;
}
.xm-plist__cats-btn,
.xm-plist__cats-btn:hover,
.xm-plist__cats-btn:focus {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	color: var(--xm-text);
	font: inherit;
	font-size: 24px;
	cursor: pointer;
}
.xm-plist__cats-btn svg {
	font-size: 22px;
	transition: transform 0.2s;
}
.xm-plist__cats-btn[aria-expanded="true"] svg {
	transform: rotate(180deg);
}
.xm-plist__cats-menu {
	position: absolute;
	top: calc(100% + 10px);
	left: 0;
	z-index: 20;
	min-width: 220px;
	margin: 0;
	padding: 8px;
	list-style: none;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
}
.xm-plist__cats-menu a {
	display: block;
	padding: 10px 14px;
	border-radius: 8px;
	font-size: 16px;
	line-height: 1.3;
	color: var(--xm-text);
}
.xm-plist__cats-menu a:hover {
	background: var(--xm-bg-base);
}
.xm-plist__cats-menu a.is-current {
	color: var(--xm-primary);
	font-weight: 700;
}

.xm-plist__sort {
	display: flex;
	align-items: center;
	gap: 28px;
}
.xm-plist__sort span {
	color: #bdbdbd;
	font-size: 18px;
}
.xm-plist__sort a {
	color: #757575;
}
.xm-plist__sort a.is-current {
	color: var(--xm-primary);
	font-weight: 700;
}

.xm-plist__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
	margin: 0;
	padding: 0 12px;
	list-style: none;
}
.xm-plist__item {
	display: flex;
	flex-direction: column;
	align-items: center;
	height: 100%;
	padding: 75px 16px 36px;
	background: #fff;
	text-align: center;
	color: var(--xm-text);
}
.xm-plist__name {
	font-size: 28px;
	font-weight: 700;
	line-height: 35px;
}
.xm-plist__btn {
	display: inline-flex;
	margin: 16px 0 28px;
	padding: 8px 16px;
	border: 1px solid var(--xm-text);
	border-radius: 12px;
	font-size: 16px;
	line-height: 19px;
	transition: background-color 0.2s, color 0.2s;
}
.xm-plist__item:hover .xm-plist__btn {
	background: var(--xm-text);
	color: #fff;
}
.xm-plist__img {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 300px;
	max-width: 100%;
	aspect-ratio: 1;
}
.xm-plist__img img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	transition: transform 0.4s ease;
}
.xm-plist__item:hover .xm-plist__img img {
	transform: scale(1.04);
}
.xm-plist__empty {
	padding: 40px 32px;
	font-size: 18px;
	color: var(--xm-text-2);
}

@media (max-width: 1199px) {
	.xm-plist__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}
@media (max-width: 767px) {
	.xm-plist__crumbs {
		padding: 20px 16px 0;
		font-size: 13px;
		gap: 0 8px;
	}
	.xm-plist__title {
		padding-top: 32px !important;
		padding-bottom: 24px !important;
		padding: 0 16px;
		font-size: 24px;
		line-height: 30px;
	}
	.xm-plist__bar {
		gap: 24px;
		padding: 20px 16px;
		font-size: 16px;
	}
	.xm-plist__cats-btn,
	.xm-plist__cats-btn:hover,
	.xm-plist__cats-btn:focus {
		font-size: 16px;
	}
	.xm-plist__sort {
		gap: 16px;
	}
	.xm-plist__sort span {
		font-size: 14px;
	}
	.xm-plist__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 8px;
		padding: 0 8px;
	}
	.xm-plist__item {
		padding: 28px 10px 20px;
	}
	.xm-plist__name {
		font-size: 16px;
		line-height: 20px;
	}
	.xm-plist__btn {
		margin: 10px 0 14px;
		padding: 5px 10px;
		border-radius: 8px;
		font-size: 12px;
		line-height: 15px;
	}
}

/* Mega menu: "Всички …" link under the cards (mi.com). */
.xm-mega__more {
	display: flex;
	justify-content: flex-end;
	margin-top: 16px;
}
.xm-mega__more a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 20px;
	border-radius: 8px;
	background: var(--xm-bg-base);
	font-size: 14px;
	color: var(--xm-text);
	transition: color 0.2s;
}
.xm-mega__more a:hover {
	color: var(--xm-primary);
}
.xm-mega__more svg {
	display: block;
}
@media (max-width: 1023px) {
	.xm-mega__more {
		justify-content: center;
		margin-top: 12px;
	}
}

/* Promotion page ------------------------------------------------------------ */

.xm-promo__banner {
	display: block;
}
.xm-promo__banner img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1920 / 770;
	object-fit: cover;
}
.xm-promo__partners {
	max-width: 1400px;
	margin: 0 auto;
	padding: 40px 20px 32px;
	text-align: center;
}
.xm-promo__title {
	max-width: 760px;
	margin: 0 auto 16px;
	font-size: 18px;
	line-height: 1.5;
	color: #333;
}
.xm-promo__list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0 44px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.xm-promo__list li > a,
.xm-promo__list li > img {
	display: block;
	width: 129px;
	height: 96px;
	transition: opacity .2s;
}
.xm-promo__list a:hover,
.xm-promo__list a:focus-visible {
	opacity: .75;
}
.xm-promo__list img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}
@media (max-width: 767px) {
	.xm-promo__banner img {
		aspect-ratio: 1080 / 1316;
	}
	.xm-promo__partners {
		padding: 28px 15px 24px;
	}
	.xm-promo__title {
		font-size: 16px;
	}
	.xm-promo__list {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		gap: 30px 30px;
	}
	.xm-promo__list li > a,
	.xm-promo__list li > img {
		width: 100%;
		height: 118px;
	}
}
