@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Open+Sans:wght@300;400;500;600;700&family=Playpen+Sans:wght@100..800&family=Roboto:wght@100;300;400;500&display=swap');
* {
    margin: 0;
    padding: 0;
}
:root {
  --mt-h: 64px;
  --mt-bg: #fff;
  --mt-border: #e5e5e5;
  --mt-text: #111;
}

/* ====== Базовый хедер ====== */
.mt-header {
  /* position: sticky; */
  top: 0;
  left: 0;
  width: 100%;
  height: var(--mt-h);
  border-bottom: 1px solid var(--mt-border);
  background: var(--mt-bg);
  z-index: 1000;
  font-family: "Inter", sans-serif;
}
.logo-block {
  display: flex;
  align-items: center;
}
.hamburger {
  margin-right:14px;
  display: none;
}
@media (max-width: 800px) {
  .hamburger{
    display: block;
  }
}

.mt-header__inner {
  max-width: 1280px;
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  padding: 0 15px;
  justify-content: space-between;
}

/* ====== Логотип ====== */
.mt-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.mt-logo__img {
  height: 36px;
  display: block;
  position:relative;
  top: -1px;
}
.mt-bascket__img {
  height: 27px;
  display: block;
  position:relative;
  right: -4px;
}
.mt-support__img {
  height: 24px;
  display: block;
  position:relative;
  right: -3px;
}

.mt-logo__text {
  font-weight: 800;
  font-size: 18px;
  color: var(--mt-text);
}

/* ====== Spacer ====== */
.mt-header__spacer {
  flex: 1;
  display: flex;
  justify-content: center;
  gap: 20px;
  font-size: 14px;
}
@media (max-width: 800px) {
  .mt-header__spacer{
    display: none;
  }
}

/* ====== Правая часть ====== */
.mt-header__right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Username и Войти */
.mt-username {
  font-weight: 300;
  color: var(--mt-text);
  position: relative;
  left: -3px;
  top: 4px;
  font-size: 16px;
  font-family: "Inter", sans-serif;
}
.profile-btn {
  position:relative;
  right:8px;
}
@media (max-width: 800px) {
  .mt-username{
    display: none;
  }
  .mt-header__right {
    gap: 10px;
  }
  .profile-btn {
    right:0px;
  }
}

.mt-signin {
  text-decoration: none;
  font-weight: 400;
  color: var(--mt-text);
  position: relative;
  left: -11px;
  top: 4px;
}

/* ====== Универсальная ссылка с бейджем (для "Мои книги" и "Корзина") ====== */
.mt-link-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--mt-text);
  font-weight: 350;
  line-height: 1;
}

.mt-link-badge__label {
  position: relative;
  padding-right: 10px; /* место под бейдж */
}

.mt-link-badge__badge {
    background-color: #ff3b30;
    font-family: 'Roboto', arial, sans-serif;
    color: white;
    font-size: 12px;
    padding: 2px 5px;
    border-radius: 30px;
    font-weight: bold;
    position: absolute;
    top: 0px;
    right: -8px;
}


/* === dropdown (user) === */
.mt-user__btn{
  display:inline-flex; align-items:center; gap:0px;
  background:transparent; border:0; cursor:pointer;
  padding:6px 8px; border-radius:10px;
}
.mt-user__btn:focus{ outline:0px solid rgba(0,0,0,.08); outline-offset:0px; }

.mt-dd{ position: relative; }
.mt-dd__menu{
  position:absolute; top:calc(100% + 8px); right:-2px;
  min-width:220px; padding:6px; border-radius:12px;
  background:#fff; border:1px solid rgba(0,0,0,.08);
  box-shadow:0 10px 30px rgba(0,0,0,.12);
  display:none; z-index:1001;
}
.mt-dd__menu a{
  display:block; padding:10px 12px; border-radius:8px;
  color:#222; text-decoration:none; font-weight:400;
}
.mt-dd__menu a:hover{ background: rgba(0,0,0,.05); }
.mt-dd__menu hr{ border:0; height:1px; background: rgba(0,0,0,.08); margin:6px; }
.mt-dd__menu .is-disabled{ opacity:.6; pointer-events:none; }

/* показать меню при открытии */
.mt-dd[data-open="true"] .mt-dd__menu{ display:block; }






/* ====== Drawer (мобильное меню) ====== */
.mt-drawer{
  position: fixed; inset: 0; z-index: 2000;
  pointer-events: none;
  
}
.mt-drawer__scrim{
  position: absolute; inset: 0;
  background: rgba(0,0,0,.35);
  opacity: 0; transition: opacity .25s ease;
}
.mt-drawer__panel{
  position: absolute; top: 0; left: 0; bottom: 0;
  width: min(88vw, 360px);
  background: #fff;
  transform: translateX(-100%);
  transition: transform .25s ease;
  padding: 12px;
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
}

/* Кнопка закрытия */
.mt-drawer__close{
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1px solid #5e5e5e;
  color: #5e5e5e;
  background: #fff;
  cursor: pointer;
  display: inline-grid; 
  place-items: center;
  font-family: "Inter", sans-serif;
  font-size: 20px;
  margin: 2px 0 12px 2px;
  line-height: 1px;
  font-weight: 200;
}

/* Навигация внутри */
.mt-drawer__nav a{
  display:block; 
  padding:12px 14px; 
  margin:8px 0;
  border-radius:12px; 
  text-decoration:none; 
  color:#222;
  background:#f4f4f6;
  font-family: "Inter", sans-serif;
  font-weight: 400;
}
.mt-drawer__nav a:hover{ background: rgba(0,0,0,.05); }

/* Разделитель */
.mt-drawer__nav hr{ border:0; height:1px; background:rgba(0,0,0,.08); margin:10px 0; }

/* Состояние "открыто" */
.mt-drawer[data-open="true"]{
  pointer-events: auto;
}
.mt-drawer[data-open="true"] .mt-drawer__scrim{
  opacity: 1;
}
.mt-drawer[data-open="true"] .mt-drawer__panel{
  transform: translateX(0);
}

/* Блокируем скролл когда открыто */
body.mt--noscroll{ overflow:hidden; }



/* Бейдж в мобильном дровере */
.mt-drawer__nav .mt-drawer__link-badge {
  position: relative;
  padding-right: 36px;          /* место под бейдж справа */
}

.mt-drawer__nav .mt-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ff3b30;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  pointer-events: none;         /* чтобы клик ловила ссылка */
}
