/* ===== Архивы произведений ===== */

.art-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}


/* Пагинация */

.pagination {
    margin:26px 0 10px;
    display:flex;
    justify-content:center;
}

.pagination ul {
    display:flex;
    gap:8px;
    list-style:none;
    padding:0;
    margin:0;
}

.pagination a, .pagination span{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:38px;
  height:38px;
  padding:0 12px;
  border:1px solid #e7e7e7;
  border-radius:12px;
  text-decoration:none;
  background:#fff;
}

.pagination .current{
  border-color:#000;
  background:#000;
  color:#fff;
}
.pagination a:hover{ transform: translateY(-1px); }


/* Сортировка */

.sort-form {
    margin-bottom: 20px;
}

.sort-form select {
    padding:10px 12px;
    border:1px solid #e7e7e7;
    border-radius:12px;
    background:#fff;
    font-size: 14px;
}

.proizvedenie-card-meta {
  margin-top: 15px;
}


.genre-categories{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin:14px 0 22px;
}

.genre-category{
  padding:8px 12px;
  border:1px solid #e7e7e7;
  border-radius:999px;
  text-decoration:none;
  background:#fff;
  font-size:14px;
}
.genre-category:hover{ transform: translateY(-1px); }

.hp-menu__item--user-account { display:none !important; }

.menu-item--user-account > ul.sub-menu {
  display: none !important;
}

/* === УБРАТЬ СТРЕЛКУ (caret) У АККАУНТА, даже если она на LI, а не на A === */
li.menu-item--user-account.menu-item-has-children::after,
li.menu-item--user-account.menu-item-has-children::before,
li.menu-item--user-account.parent::after,
li.menu-item--user-account.parent::before,
li.menu-item--user-account > a::after,
li.menu-item--user-account > a::before,
li.menu-item--user-account .hp-menu__item::after,
li.menu-item--user-account .hp-menu__item::before {
  content: none !important;
  display: none !important;
  background: none !important;
  border: 0 !important;
}

/* На случай если стрелка — это background-image / mask-image */
li.menu-item--user-account > a,
li.menu-item--user-account > a.hp-menu__item {
  background-image: none !important;
  -webkit-mask-image: none !important;
  mask-image: none !important;
  padding-right: 0 !important;
}

.work-head__report{
  display:inline-flex;
  align-items:center;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.12);
  text-decoration:none;
  font-size:14px;
}
.work-head__report:hover{
  border-color: rgba(0,0,0,.25);
}

/* ===== Общие переменные/цвета ===== */
:root{
  --portal-accent: #6C4DFF; /* фиолетовый как на макетах (можно чуть подстроить) */
  --portal-text: #111;
  --portal-muted: #666;
  --portal-border: rgba(108,77,255,.35);
}

/* ===== Страница "Благодарим" ===== */
.portal-thanks{
  min-height: calc(100vh - 658px);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:48px 16px;
}

.portal-thanks__inner{
  text-align:center;
  max-width: 720px;
}

.portal-thanks__spinner{
  color: var(--portal-accent);
  display:inline-flex;
  margin-bottom: 14px;
}

.portal-thanks__title{
  font-size: 26px;
  font-weight: 700;
  color: var(--portal-text);
  margin: 0 0 6px 0;
}

.portal-thanks__subtitle{
  font-size: 13px;
  color: var(--portal-muted);
  margin: 0 0 18px 0;
}

.portal-thanks__actions{
  display:flex;
  justify-content:center;
  gap: 12px;
  flex-wrap:wrap;
}

.portal-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height: 42px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  text-decoration:none;
  transition: .15s ease;
}

.portal-btn--primary{
  background: var(--portal-accent);
  color:#fff;
  border: 1px solid var(--portal-accent);
}

.portal-btn--primary:hover{ filter: brightness(0.96); }

.portal-btn--outline{
  background: transparent;
  color: var(--portal-accent);
  border: 1px solid var(--portal-border);
}

.portal-btn--outline:hover{
  background: rgba(108,77,255,.06);
}

/* ===== Попап "Контакты" ===== */
.portal-modal{
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
}

.portal-modal.is-open{ display:block; }

.portal-modal__overlay{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,.25);
}

.portal-modal__dialog{
  position: relative;
  max-width: 980px;
  width: calc(100% - 32px);
  margin: 64px auto 0 auto;
  background: #fff;
  border-radius: 14px;
  padding: 22px 22px 18px;
  box-shadow: 0 18px 60px rgba(0,0,0,.18);
}

.portal-modal__title{
  font-size: 22px;
  font-weight: 700;
  color: var(--portal-text);
  margin: 0 0 16px 0;
}

.portal-modal__close{
  position:absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  color:#111;
}

.portal-modal__close:hover{ background: rgba(0,0,0,.05); }

.portal-contacts{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
  padding-top: 6px;
}

.portal-contacts__label{
  display:inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--portal-accent);
  background: rgba(108,77,255,.10);
  padding: 6px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.portal-contacts__value{
  color: #111;
  text-decoration: none;
  font-size: 14px;
}

.portal-contacts__value:hover{
  text-decoration: underline;
}

/* Триггеры */
.portal-contacts-trigger{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  cursor:pointer;
  border: none;
  background: transparent;
  color: inherit;
  padding: 6px 8px;
  border-radius: 10px;
}

.portal-contacts-trigger--icon{
  margin-left: 8px;
}

.portal-contacts-trigger--icon svg{
  color: var(--portal-accent);
}

.portal-contacts-trigger--footer{
  margin-left: 10px;
  font-weight: 600;
}

.portal-contacts-trigger:hover{
  background: rgba(0,0,0,.04);
}

/* Адаптив */
@media (max-width: 820px){
  .portal-contacts{ grid-template-columns: 1fr; }
  .portal-modal__dialog{ margin-top: 18px; }
}

.portal-modal-lock { overflow: hidden; }

/* ===== Footer grooming ===== */
.footer-navbar__end{
  width: 100%;
  justify-content: center;
}

/* контейнер справа в футере: меню + контакты + поиск */
.footer-actions{
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "menu contacts"
    "search search";
  gap: 10px 16px;
  align-items: center;
}

/* области сетки */
.footer-navbar__menu{ grid-area: menu; }
.portal-contacts-trigger--footer{ grid-area: contacts; }
.footer-search{ grid-area: search; width: 100%; max-width: none; min-width: 0; }

/* Меню футера в одну линию */
.footer-navbar__menu > ul{
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Ссылки меню */
.footer-navbar__menu a{
  text-decoration: none;
  opacity: .85;
}
.footer-navbar__menu a:hover{
  opacity: 1;
}

/* ===== Кнопка "Контакты" в футере ===== */
.portal-contacts-trigger--footer{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 8px 18px;
  margin: 0;

  background: #6941c6;
  color: #fff;

  border: 1px solid #6941c6;
  border-radius: 999px;

  font-size: 13px;
  font-weight: 600;
  line-height: 1;

  cursor: pointer;
  transition: all .2s ease;

  white-space: nowrap;
}

/* hover */
.portal-contacts-trigger--footer:hover{
  background: #5a3ee6;
  border-color: #5a3ee6;
  box-shadow: 0 4px 14px rgba(108, 77, 255, .25);
}

/* active */
.portal-contacts-trigger--footer:active{
  transform: translateY(1px);
  box-shadow: none;
}

.portal-contacts-trigger--footer:hover{
  opacity: 1;
  text-decoration: underline;
}

/* Поиск в футере: компактно */
.footer-search form{
  display: flex;
  gap: 8px;
  align-items: center;
}
.footer-search input[type="search"],
.footer-search input[type="text"]{
  height: 34px;
  border-radius: 10px;
  padding: 0 12px;
}
.footer-search button,
.footer-search input[type="submit"]{
  height: 34px;
  border-radius: 10px;
  padding: 0 12px;
}

/* Мобилка: всё в столбик */
@media (max-width: 860px){
  .footer-actions{
    grid-template-columns: 1fr;
    grid-template-areas:
      "menu"
      "contacts"
      "search";
  }
}

/* =========================
   HEADER SEARCH (DESKTOP) + BURGER SEARCH (MOBILE)
   ========================= */

/* Общие размеры для формы поиска (десктоп и бургер) */
.header-search--desktop input[type="search"],
.header-search--desktop input[type="text"],
.header-burger-search input[type="search"],
.header-burger-search input[type="text"]{
  height: 34px;
  min-height: 34px;
  line-height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  box-sizing: border-box;
}

.header-search--desktop button,
.header-search--desktop input[type="submit"],
.header-burger-search button,
.header-burger-search input[type="submit"]{
  height: 34px;
  min-height: 34px;
  line-height: 34px;
  padding: 0 14px;
  border-radius: 10px;
  box-sizing: border-box;
  white-space: nowrap;
}

/* ===== Desktop search ===== */
.header-search--desktop{
  display: flex;
  align-items: center;
  margin-left: 14px;
}

.header-search--desktop form{
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

/* Убираем возможные верх/низ отступы, из-за которых "липнет" */
.header-navbar__menu{
  align-items: center;
}
.header-search--desktop,
.header-search--desktop *{
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* ===== Burger search: default hidden (desktop) ===== */
.header-burger-search{
  display: none;
}

/* В бургере это контейнер, а не пункт-ссылка */
.menu-item--burger-search{
  cursor: default;
  padding: 10px 12px 6px;
}
.menu-item--burger-search > a{
  display: none !important;
}

/* ===== Mobile rules ===== */
@media (max-width: 860px){

  /* На мобилке поиск в десктопном меню прячем полностью */
  .header-search--desktop,
  .header-navbar__menu .header-search,
  .header-navbar__menu .search-form,
  .header-navbar__menu form{
    display: none !important;
  }

  /* Поиск в бургере показываем */
  .header-burger-search{
    display: block;
  }

  .header-burger-search form{
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    width: 100%;
  }

  .header-burger-search input[type="search"],
  .header-burger-search input[type="text"]{
    width: 100%;
  }

  /* На мобилке кнопка чуть компактнее (чтобы влезало) */
  .header-burger-search button,
  .header-burger-search input[type="submit"]{
    padding: 0 12px;
  }
}

.art-grid.art-grid--masonry .work-card--art .work-card__hover-bottom{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
}

.art-grid.art-grid--masonry .work-card--art .work-card__hover-date{
  margin-left:8px;
  font-size:12px;
  opacity:.9;
  white-space:nowrap;
}



.term-description-wrapper {
  position: relative;
  margin-bottom: 30px;
}

.term-description {
  max-height: 160px; /* сколько видно в свернутом виде */
  overflow: hidden;
  position: relative;
  transition: max-height 0.4s ease;
}

/* Градиентное затемнение внизу */
.term-description::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: linear-gradient(to bottom, rgba(255,255,255,0), #fff);
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.term-description.expanded {
  max-height: 2000px; /* большое значение */
}

.term-description.expanded::after {
  opacity: 0;
}

.term-description-toggle {
  margin-top: 10px;
  background: none;
  border: none;
  color: #000;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}


.smysly-btn.smysly-btn-message{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 14px;
  border-radius:10px;
  border:1px solid rgba(0,0,0,.12);
  text-decoration:none;
  line-height:1;
  margin-top: 15px;
  transition:transform .08s ease, opacity .2s ease;
}

.smysly-btn.smysly-btn-message:hover{
  opacity:.9;
  transform:translateY(-1px);
}




/* Кнопка "Сообщения" в UM-профиле */
.smysly-btn-message{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  padding:10px 18px;
  border-radius:10px;

  background:#6c4dff;
  color:#ffffff;
  font-weight:600;
  font-size:14px;

  text-decoration:none;
  border:none;
  cursor:pointer;

  transition:all .2s ease;
  box-shadow:0 4px 12px rgba(108,77,255,.25);
}

/* hover */
.smysly-btn-message:hover{
  background:#5b3ee6;
  color:#ffffff;
  transform:translateY(-1px);
  box-shadow:0 6px 16px rgba(108,77,255,.35);
}

/* active */
.smysly-btn-message:active{
  transform:translateY(0);
  box-shadow:0 3px 8px rgba(108,77,255,.25);
}



/* Taxonomy description expander */
.taxonomy-description-bottom{
  margin: 28px 0 0;
  padding-top: 12px;
}
.taxonomy-description-expand{
  position: relative;
}
.taxonomy-description-expand__content{
  position: relative;
  max-height: 220px;
  overflow: hidden;
  transition: max-height .25s ease;
}
.taxonomy-description-expand__content::after{
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 72px;
  background: linear-gradient(to bottom, rgba(255,255,255,0), #fff 75%);
  pointer-events: none;
}
.taxonomy-description-expand__input:checked ~ .taxonomy-description-expand__content{
  max-height: none;
}
.taxonomy-description-expand__input:checked ~ .taxonomy-description-expand__content::after{
  display: none;
}
.taxonomy-description-expand__toggle{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  margin-top: 14px;
  border-radius: 999px;
  background: #f5f2ff;
  border: 1px solid #d9cffd;
  color: #6c4dff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: .2s ease;
}
.taxonomy-description-expand__toggle:hover{
  background: #efe9ff;
  border-color: #c7b7ff;
}
.taxonomy-description-expand__toggle::before{
  content: "Показать ещё";
}
.taxonomy-description-expand__input:checked ~ .taxonomy-description-expand__toggle::before{
  content: "Свернуть";
}
.taxonomy-description-bottom .taxonomy-description{
  margin: 0;
}
.taxonomy-description-bottom .taxonomy-description > *:first-child{
  margin-top: 0;
}
.taxonomy-description-bottom .taxonomy-description > *:last-child{
  margin-bottom: 0;
}

/* =========================================================
   HEADER ONE-LINE FIX: compact desktop menu/search/user item
   ========================================================= */
@media (min-width: 861px) {
  .site-header .header-navbar,
  .site-header .header-navbar__start,
  .site-header .header-navbar__end,
  .site-header .header-navbar__menu,
  .site-header .header-navbar__menu > ul,
  .site-header .header-navbar__menu .menu {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
  }

  .site-header .header-navbar__start {
    flex: 0 0 auto;
  }

  .site-header .header-navbar__end {
    flex: 1 1 auto;
    min-width: 0;
    justify-content: flex-end;
  }

  .site-header .header-navbar__menu {
    flex: 1 1 auto;
    min-width: 0;
    justify-content: flex-end;
  }

  .site-header .header-navbar__menu > ul,
  .site-header .header-navbar__menu .menu {
    min-width: 0;
    max-width: 100%;
  }

  .site-header .header-navbar__menu li,
  .site-header .header-navbar__menu a {
    white-space: nowrap;
  }

  .site-header .header-navbar__menu > ul > li > a,
  .site-header .header-navbar__menu .menu > li > a {
    padding-left: 12px;
    padding-right: 12px;
  }

  .header-search--desktop {
    flex: 0 1 260px;
    width: 260px;
    max-width: 260px;
    min-width: 220px;
    margin-left: 10px;
  }

  .header-search--desktop form {
    width: 100%;
    min-width: 0;
  }

  .header-search--desktop input[type="search"],
  .header-search--desktop input[type="text"] {
    width: 100%;
    min-width: 0;
  }

  .header-search--desktop button,
  .header-search--desktop input[type="submit"] {
    flex: 0 0 auto;
  }

  .site-header .smysly-menu-user--compact > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    min-width: 38px;
    height: 38px;
    padding: 0 !important;
    line-height: 1;
  }

  .smysly-menu-user__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    overflow: hidden;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 16px;
  }

  .smysly-menu-user__avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
  }

  .smysly-menu-user__label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}

@media (min-width: 861px) and (max-width: 1280px) {
  .header-search--desktop {
    flex-basis: 220px;
    width: 220px;
    max-width: 220px;
    min-width: 190px;
  }

  .site-header .header-navbar__menu > ul > li > a,
  .site-header .header-navbar__menu .menu > li > a {
    padding-left: 9px;
    padding-right: 9px;
  }
}

/* =========================================================
   HEADER FIX V4: desktop icon/menu spacing + mobile avatar size
   ========================================================= */

/* Desktop: reserve real space for contacts + bell before the menu */
@media (min-width: 861px) {
  .site-header .header-navbar__end {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 0 !important;
  }

  .site-header .portal-contacts-trigger--icon,
  .site-header .portal-notif-bell--header {
    flex: 0 0 34px !important;
    width: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    height: 38px !important;
    min-height: 38px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    overflow: visible !important;
  }

  .site-header .portal-contacts-trigger--icon {
    margin-right: 8px !important;
  }

  .site-header .portal-notif-bell--header {
    margin-right: 38px !important;
  }

  .site-header .portal-contacts-trigger--icon svg,
  .site-header .portal-notif-bell--header svg {
    width: 20px !important;
    height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
    display: block !important;
  }

  .site-header .portal-notif-bell--header .portal-notif-bell__badge {
    top: -5px !important;
    right: -7px !important;
    z-index: 5 !important;
  }

  .site-header .header-navbar__menu {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    position: relative !important;
    z-index: 1 !important;
  }
}

/* Mobile/burger menu: prevent avatar from stretching to full menu width */
@media (max-width: 860px) {
  .site-header .header-navbar__burger .smysly-menu-user--compact > a,
  .site-header .header-navbar__burger li.smysly-menu-user--compact > a,
  .site-header .header-navbar__burger li.menu-item--user-account > a {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    width: auto !important;
    height: auto !important;
    min-height: 44px !important;
    padding: 8px 0 !important;
    line-height: 1.3 !important;
    text-indent: 0 !important;
  }

  .site-header .header-navbar__burger .smysly-menu-user__avatar,
  .site-header .header-navbar__burger li.menu-item--user-account .smysly-menu-user__avatar {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 34px !important;
    width: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    border-radius: 999px !important;
    overflow: hidden !important;
    background: #f3f4f6 !important;
  }

  .site-header .header-navbar__burger .smysly-menu-user__avatar img,
  .site-header .header-navbar__burger li.menu-item--user-account .smysly-menu-user__avatar img {
    display: block !important;
    width: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    object-fit: cover !important;
    border-radius: 999px !important;
  }

  .site-header .header-navbar__burger .smysly-menu-user__label {
    position: static !important;
    width: auto !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    clip: auto !important;
    white-space: normal !important;
    border: 0 !important;
  }
}

/* =========================================================
   HEADER FIX V5: submenu layer, desktop bell spacing, mobile account duplicate
   ========================================================= */

/* Header dropdowns must stay above hero/banners/content */
.site-header,
.header-navbar,
.header-navbar__end,
.header-navbar__menu {
  position: relative;
}

.site-header {
  z-index: 9999;
}

.site-header .header-navbar__menu ul.sub-menu,
.site-header .header-navbar__burger ul.sub-menu,
.site-header .sub-menu,
.site-header .children {
  z-index: 10050 !important;
}

@media (min-width: 861px) {
  /* Give the notification icon a larger protected zone before the first menu item */
  .site-header .portal-notif-bell--header {
    margin-right: 64px !important;
  }

  .site-header .header-navbar__menu {
    margin-left: 18px !important;
    z-index: 2 !important;
  }

  .site-header .portal-contacts-trigger--icon,
  .site-header .portal-notif-bell--header {
    position: relative !important;
    z-index: 5 !important;
  }

  .site-header .header-navbar__menu > ul > li:first-child > a,
  .site-header .header-navbar__menu .menu > li:first-child > a {
    padding-left: 20px !important;
  }
}

@media (max-width: 860px) {
  /* In the burger menu the account label was duplicated by the mobile menu renderer. */
  .site-header .header-navbar__burger .smysly-menu-user__label {
    display: none !important;
  }

  .site-header .header-navbar__burger .smysly-menu-user--compact > a,
  .site-header .header-navbar__burger li.smysly-menu-user--compact > a,
  .site-header .header-navbar__burger li.menu-item--user-account > a {
    min-height: 42px !important;
    padding: 6px 0 !important;
  }

  .site-header .header-navbar__burger .smysly-menu-user__avatar,
  .site-header .header-navbar__burger li.menu-item--user-account .smysly-menu-user__avatar,
  .site-header .header-navbar__burger .smysly-menu-user__avatar img,
  .site-header .header-navbar__burger li.menu-item--user-account .smysly-menu-user__avatar img {
    width: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
  }
}

/* =========================================================
   HEADER FIX V6: mobile account placement + larger desktop bell gap
   ========================================================= */

@media (min-width: 861px) {
  /* Larger protected gap between notification bell and the first menu item. */
  .site-header .portal-notif-bell--header {
    margin-right: 86px !important;
  }

  .site-header .header-navbar__menu {
    margin-left: 24px !important;
  }
}

@media (max-width: 860px) {
  /* Hide the separate top mobile account link (/account/). The real profile item stays in the menu list below. */
  .site-header .header-navbar__burger a[href*="/account/"] {
    display: none !important;
  }

  /* Show the nickname near the bottom avatar/profile menu item. */
  .site-header .header-navbar__burger .smysly-menu-user__label {
    display: inline !important;
    position: static !important;
    width: auto !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    clip: auto !important;
    white-space: normal !important;
    border: 0 !important;
    font-weight: 600 !important;
  }

  .site-header .header-navbar__burger .smysly-menu-user--compact > a,
  .site-header .header-navbar__burger li.smysly-menu-user--compact > a,
  .site-header .header-navbar__burger li.menu-item--user-account > a {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    width: auto !important;
    min-height: 42px !important;
    padding: 6px 0 !important;
    line-height: 1.3 !important;
  }
}

/* =========================================================
   HEADER FIX V7: remove duplicate top account link in mobile
   ========================================================= */
@media (max-width: 768px) {
  /*
   * ListingHive/HivePress выводит отдельную ссылку аккаунта в верхней части
   * мобильной панели. Она ведёт на /account/ и дублирует наш пункт профиля ниже.
   * Скрываем именно верхний системный пункт аккаунта, не трогая пункт /user/{id}/.
   */
  body .site-header li:has(> a[href$="/account/"]),
  body .site-header li:has(> a[href*="/account/"]),
  body .header-navbar li:has(> a[href$="/account/"]),
  body .header-navbar li:has(> a[href*="/account/"]),
  body .header-navbar__burger li:has(> a[href$="/account/"]),
  body .header-navbar__burger li:has(> a[href*="/account/"]),
  body .mobile-menu li:has(> a[href$="/account/"]),
  body .mobile-menu li:has(> a[href*="/account/"]),
  body .offcanvas li:has(> a[href$="/account/"]),
  body .offcanvas li:has(> a[href*="/account/"]) {
    display: none !important;
  }

  /* Fallback: если ссылка аккаунта не лежит внутри li */
  body .site-header a[href$="/account/"],
  body .site-header a[href*="/account/"],
  body .header-navbar a[href$="/account/"],
  body .header-navbar a[href*="/account/"],
  body .header-navbar__burger a[href$="/account/"],
  body .header-navbar__burger a[href*="/account/"] {
    display: none !important;
  }

  /* Нижний кастомный пункт профиля оставляем: аватар + ник */
  body .site-header .smysly-menu-user--compact,
  body .header-navbar .smysly-menu-user--compact,
  body .header-navbar__burger .smysly-menu-user--compact {
    display: list-item !important;
  }

  body .site-header .smysly-menu-user--compact > a,
  body .header-navbar .smysly-menu-user--compact > a,
  body .header-navbar__burger .smysly-menu-user--compact > a {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
  }

  body .site-header .smysly-menu-user--compact .smysly-menu-user__label,
  body .header-navbar .smysly-menu-user--compact .smysly-menu-user__label,
  body .header-navbar__burger .smysly-menu-user--compact .smysly-menu-user__label {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
    text-indent: 0 !important;
    position: static !important;
    font-weight: 600 !important;
  }
}
