/* ==========================================================================
   ШАПКА TERMINAL (3 строки) + ГАЛЕРЕЯ ФОТО В КАРТОЧКАХ
   Подключается ПОСЛЕ style.css и переопределяет старую шапку.
   ========================================================================== */

/* Старую шапку полностью гасим */
.topbar, .header .header-main, .catnav { display: none !important; }

/* ────────── СТРОКА 1 ────────── */
.tbar {
  background: #fff;
  border-bottom: 1px solid var(--g100);
  font-size: 12.5px;
}
.tbar-in {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 38px;
}
.tbar-left { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.tbar-city {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--black); text-decoration: none; white-space: nowrap;
}
.tbar-city b { font-weight: 600; border-bottom: 1px dashed var(--g500); }
.tbar-city:hover b { color: var(--orange); border-color: var(--orange); }
.tbar-flag { font-size: 13px; }
.tbar-pvz {
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--g700); text-decoration: none; white-space: nowrap;
}
.tbar-pvz:hover { color: var(--orange); }
.tbar-pvz svg { color: var(--orange); flex-shrink: 0; }

.tbar-nav {
  display: flex; align-items: center; gap: 20px;
  margin: 0 auto; flex-wrap: nowrap; overflow: hidden;
}
.tbar-nav a {
  color: var(--g900); text-decoration: none; white-space: nowrap;
  transition: color .15s;
}
.tbar-nav a:hover { color: var(--orange); }

.tbar-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.tbar-help {
  width: 17px; height: 17px; border-radius: 50%;
  border: 1.4px solid var(--g500); color: var(--g700);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; cursor: help;
}
.tbar-phone {
  color: var(--black); font-weight: 700; text-decoration: none;
  font-size: 13.5px; white-space: nowrap;
}
.tbar-phone:hover { color: var(--orange); }

/* ────────── СТРОКА 2 ────────── */
.hdr {
  background: #fff;
  position: sticky; top: 0; z-index: 60;
  box-shadow: 0 1px 0 var(--g100);
}
.hdr-in {
  display: flex; align-items: center; gap: 14px;
  min-height: 72px;
}

.hdr-burger { display: none; }

.hdr-logo {
  display: flex; align-items: center; gap: 9px;
  text-decoration: none; flex-shrink: 0;
}
.hdr-logo-mark {
  width: 44px; height: 44px; border-radius: 10px;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; line-height: 1;
}
.hdr-logo-txt {
  font-size: 19px; font-weight: 900; color: var(--black);
  letter-spacing: -.6px; line-height: 1.05; white-space: nowrap;
}
.hdr-logo-txt span { color: var(--orange); }

/* Кнопка Каталог — оранжевая, с бургером */
.hdr-catbtn {
  display: inline-flex; align-items: center; gap: 9px;
  height: 44px; padding: 0 18px;
  background: var(--orange); color: #fff;
  border: 0; border-radius: 9px; cursor: pointer;
  font-size: 14.5px; font-weight: 700; font-family: inherit;
  flex-shrink: 0; transition: background .15s;
}
.hdr-catbtn:hover { background: var(--orange-dark); }
.hdr-catbtn-ico {
  display: inline-flex; flex-direction: column; gap: 3px; width: 16px;
}
.hdr-catbtn-ico span {
  display: block; height: 2px; background: #fff; border-radius: 2px;
}

/* Поиск */
.hdr-search {
  flex: 1; min-width: 0; position: relative;
  display: flex; align-items: center;
  height: 44px;
  border: 2px solid var(--g200); border-radius: 9px;
  background: #fff; overflow: hidden;
  transition: border-color .15s;
}
.hdr-search:focus-within { border-color: var(--orange); }
.hdr-search input[type=text] {
  flex: 1; min-width: 0; height: 100%;
  border: 0; outline: 0; padding: 0 12px 0 15px;
  font-size: 14px; font-family: inherit; color: var(--black);
  background: transparent;
}
.hdr-search input[type=text]::placeholder { color: var(--g500); }
.hdr-search-cam {
  border: 0; background: transparent; cursor: pointer;
  color: var(--g500); padding: 0 10px; height: 100%;
  display: flex; align-items: center; flex-shrink: 0;
  border-left: 1px solid var(--g100);
}
.hdr-search-cam:hover { color: var(--orange); }
.hdr-search-go {
  border: 0; cursor: pointer; flex-shrink: 0;
  width: 52px; height: 100%;
  background: var(--orange); color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.hdr-search-go:hover { background: var(--orange-dark); }

/* Иконки действий */
.hdr-acts { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.hact2 {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  min-width: 66px; padding: 6px 4px;
  text-decoration: none; color: var(--g900);
  border-radius: 8px; transition: color .15s, background .15s;
}
.hact2:hover { color: var(--orange); background: var(--orange-soft); }
.hact2 span { font-size: 11px; font-weight: 500; white-space: nowrap; }
.hact2-badge {
  position: absolute; top: 2px; right: 10px;
  min-width: 17px; height: 17px; padding: 0 4px;
  background: var(--orange); color: #fff;
  border-radius: 9px; font-size: 10.5px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  font-style: normal; border: 2px solid #fff;
}

/* Авторизация — прижата к правому краю через отступ */
.hdr-auth {
  display: flex; align-items: center; gap: 6px;
  flex-shrink: 0; margin-left: 22px;
}
.btn-auth {
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 20px;
  background: var(--g100); color: var(--black);
  border-radius: 9px; text-decoration: none;
  font-size: 14px; font-weight: 700;
  transition: background .15s, color .15s;
}
.btn-auth:hover { background: var(--orange); color: #fff; }
.btn-auth-ava {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--orange); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 800; flex-shrink: 0;
}
.btn-auth:hover .btn-auth-ava { background: #fff; color: var(--orange); }
.btn-auth-txt { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-exit {
  width: 38px; height: 44px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  background: var(--g100); color: var(--g700);
  text-decoration: none; font-size: 15px;
}
.btn-exit:hover { background: var(--red); color: #fff; }

/* ────────── СТРОКА 3 ────────── */
.cnav { background: #fff; border-top: 1px solid var(--g100); border-bottom: 1px solid var(--g200); }
.cnav-in {
  display: flex; align-items: center; gap: 16px;
  min-height: 46px;
}
.cnav-links {
  display: flex; align-items: center; gap: 4px;
  flex: 1; min-width: 0; overflow-x: auto;
  scrollbar-width: none;
}
.cnav-links::-webkit-scrollbar { display: none; }
.cnav-link {
  display: inline-flex; align-items: center;
  padding: 0 12px; height: 34px; border-radius: 8px;
  color: var(--g900); text-decoration: none;
  font-size: 13.5px; font-weight: 500; white-space: nowrap;
  transition: background .15s, color .15s;
}
.cnav-link:hover { background: var(--orange-soft); color: var(--orange-dark); }
.cnav-link.is-sale { color: var(--orange); font-weight: 700; }
.cnav-link.is-sale::before { content: '%'; margin-right: 5px; font-weight: 900; }
.cnav-biz {
  display: inline-flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 15px; flex-shrink: 0;
  background: var(--orange); color: #fff;
  border-radius: 8px; text-decoration: none;
  font-size: 13.5px; font-weight: 700;
  transition: background .15s;
}
.cnav-biz:hover { background: var(--orange-dark); }

/* ────────── АДАПТИВ ────────── */

/* Компактный десктоп */
@media (max-width: 1300px) {
  .tbar-nav { gap: 14px; font-size: 12px; }
  .hact2 { min-width: 58px; }
  .hdr-auth { margin-left: 12px; }
  .btn-auth { padding: 0 14px; }
}
@media (max-width: 1150px) {
  .tbar-nav a:nth-child(n+6) { display: none; }
  .hdr-logo-txt { font-size: 17px; }
}
@media (max-width: 1050px) {
  .hact2 span { display: none; }
  .hact2 { min-width: 44px; }
  .btn-auth-txt { display: none; }
}

/* Планшет */
@media (max-width: 900px) {
  .tbar { display: none; }
  .hdr-in { min-height: 60px; gap: 10px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
  .hdr-burger {
    display: flex; flex-direction: column; justify-content: center; gap: 4px;
    width: 40px; height: 40px; padding: 0 9px;
    background: var(--orange); border: 0; border-radius: 9px; cursor: pointer;
    flex-shrink: 0;
  }
  .hdr-burger span { display: block; height: 2px; background: #fff; border-radius: 2px; }
  .hdr-catbtn { display: none; }
  .hdr-acts { display: none; }
  .hdr-auth { margin-left: auto; }
  .btn-auth { height: 40px; padding: 0 12px; }
  .hdr-search { order: 10; flex-basis: 100%; height: 42px; }
  .cnav-biz { display: none; }
  .cnav-in { min-height: 42px; }
}

/* Смартфон — как на скриншоте 1 */
@media (max-width: 640px) {
  .hdr { position: static; }
  .hdr-in { min-height: 54px; gap: 8px; }
  .hdr-logo-mark { width: 38px; height: 38px; font-size: 20px; border-radius: 9px; }
  .hdr-logo-txt { font-size: 15px; }
  .hdr-logo-txt span { display: inline; }
  .cnav { border-top: 0; }
  .cnav-in { padding-left: 12px; padding-right: 12px; }
  .cnav-link { font-size: 13px; padding: 0 10px; }
  /* нижняя панель включается правилами style.css */
  .tabbar { display: block !important; }
  body { padding-bottom: 62px; }
}
@media (max-width: 420px) {
  .hdr-logo-txt { font-size: 0; }              /* оставляем только знак */
  .hdr-logo-txt span { font-size: 0; }
  .btn-auth { padding: 0 10px; }
}

/* Распашное меню по кнопке «Каталог» (десктоп) */
.catdrop {
  display: none;
  position: absolute; left: 0; right: 0; z-index: 55;
  background: #fff; border-bottom: 1px solid var(--g200);
  box-shadow: 0 14px 30px rgba(0,0,0,.09);
}
.catdrop.open { display: block; }
.catdrop-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 6px; padding: 18px 0 24px;
}
.catdrop-grid a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 9px;
  color: var(--black); text-decoration: none; font-size: 14px; font-weight: 500;
}
.catdrop-grid a:hover { background: var(--orange-soft); color: var(--orange-dark); }
.catdrop-grid .ico { font-size: 20px; }
@media (max-width: 900px) { .catdrop-grid { grid-template-columns: repeat(2, 1fr); } }

/* ==========================================================================
   ГАЛЕРЕЯ ФОТО В КАРТОЧКЕ ТОВАРА (скриншоты 3 и 4)
   Листание при движении мыши + точки-индикаторы
   ========================================================================== */
.pgal {
  position: relative; display: block;
  aspect-ratio: 1 / 1; width: 100%;
  background: var(--g50); border-radius: 10px;
  overflow: hidden; text-decoration: none;
}
.pgal-slide {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .18s ease;
}
.pgal-slide.is-active { opacity: 1; }
.pgal-slide img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pgal-emoji { font-size: 64px; line-height: 1; }

/* Невидимые зоны наведения: сколько фото — столько зон */
.pgal-zones { position: absolute; inset: 0; display: flex; z-index: 3; }
.pgal-zones span { flex: 1; }

/* Точки количества фото */
.pgal-dots {
  position: absolute; bottom: 7px; left: 0; right: 0; z-index: 4;
  display: flex; justify-content: center; gap: 5px;
  opacity: 0; transition: opacity .18s;
  pointer-events: none;
}
.pgal:hover .pgal-dots, .pgal.is-touched .pgal-dots { opacity: 1; }
.pgal-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--g200); transition: background .15s, transform .15s;
}
.pgal-dot.is-active { background: var(--orange); transform: scale(1.25); }

/* На тач-устройствах точки видны всегда */
@media (hover: none) {
  .pgal-dots { opacity: 1; }
  .pgal-zones { display: none; }
}

/* Стрелки листания (появляются на наведении) */
.pgal-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 5; width: 26px; height: 26px; border: 0; cursor: pointer;
  border-radius: 50%; background: rgba(255,255,255,.92);
  box-shadow: 0 2px 8px rgba(0,0,0,.14);
  display: none; align-items: center; justify-content: center;
  color: var(--g900); font-size: 14px; line-height: 1; padding: 0;
}
.pgal:hover .pgal-arrow { display: flex; }
.pgal-arrow:hover { color: var(--orange); }
.pgal-arrow.prev { left: 6px; }
.pgal-arrow.next { right: 6px; }
@media (hover: none) { .pgal:hover .pgal-arrow { display: none; } }

/* Значки на карточке */
.pgal-badge {
  position: absolute; top: 8px; left: 8px; z-index: 4;
  background: var(--orange); color: #fff;
  font-size: 11px; font-weight: 800;
  padding: 3px 8px; border-radius: 6px;
}
.pgal-badge.sale { background: var(--red); }
.pgal-badge.new  { background: var(--green); }
.pgal-fav {
  position: absolute; top: 8px; right: 8px; z-index: 5;
  width: 28px; height: 28px; border: 0; border-radius: 50%;
  background: rgba(255,255,255,.9); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--g500); padding: 0;
}
.pgal-fav:hover, .pgal-fav.is-on { color: var(--red); }

/* Скидка зелёной плашкой (как на скриншотах) */
.prod-disc {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--green); color: #fff;
  font-size: 12px; font-weight: 800;
  padding: 3px 8px; border-radius: 6px; margin-bottom: 6px;
}

/* ==========================================================================
   ЗАГРУЗКА ФОТО В КАБИНЕТЕ ПРОДАВЦА
   ========================================================================== */
.updrop {
  border: 2px dashed var(--g200); border-radius: 11px;
  padding: 20px; text-align: center; background: var(--g50);
  cursor: pointer; transition: border-color .15s, background .15s;
}
.updrop:hover, .updrop.is-over { border-color: var(--orange); background: var(--orange-soft); }
.updrop-ico { font-size: 30px; margin-bottom: 6px; }
.updrop-hint { font-size: 12.5px; color: var(--g500); margin-top: 4px; }

.upgrid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px; margin-top: 14px;
}
.upitem {
  position: relative; aspect-ratio: 1/1;
  border: 1px solid var(--g200); border-radius: 9px;
  overflow: hidden; background: #fff;
}
.upitem img { width: 100%; height: 100%; object-fit: cover; display: block; }
.upitem-del {
  position: absolute; top: 5px; right: 5px;
  width: 22px; height: 22px; border: 0; border-radius: 50%;
  background: rgba(0,0,0,.6); color: #fff; cursor: pointer;
  font-size: 12px; line-height: 1; padding: 0;
}
.upitem-del:hover { background: var(--red); }
.upitem-main {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: var(--orange); color: #fff;
  font-size: 10.5px; font-weight: 700; text-align: center; padding: 3px;
}

/* Причина отказа модерации */
.reject-box {
  border: 1px solid var(--red); border-left: 4px solid var(--red);
  background: #FEF2F2; border-radius: 10px;
  padding: 14px 16px; margin-bottom: 18px;
}
.reject-box-t {
  font-size: 14px; font-weight: 800; color: var(--red);
  display: flex; align-items: center; gap: 7px; margin-bottom: 6px;
}
.reject-box p { font-size: 13.5px; color: var(--g900); line-height: 1.6; margin: 0; }
.reject-box small { display: block; color: var(--g500); font-size: 12px; margin-top: 7px; }


/* =========================================================================
   КНОПКА СРАВНЕНИЯ В КАРТОЧКЕ (под сердечком)
   ========================================================================= */
.pgal-cmp {
  position: absolute;
  top: 46px;
  right: 8px;
  z-index: 5;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 1px 5px rgba(0, 0, 0, .12);
  color: var(--g500);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .16s, color .16s, background .16s;
}

.prod-card:hover .pgal-cmp,
.pgal-cmp.is-on {
  opacity: 1;
}

.pgal-cmp:hover {
  color: var(--orange);
}

.pgal-cmp.is-on {
  background: var(--orange);
  color: #fff;
}

/* Сердечко тоже держим видимым, если товар уже в избранном */
.pgal-fav.is-on {
  opacity: 1;
  background: #fff;
  color: var(--red);
}

/* На тач-устройствах hover нет — показываем кнопки всегда */
@media (hover: none) {
  .pgal-cmp,
  .pgal-fav { opacity: 1; }
}


/* =========================================================================
   ФИКС ЗОНЫ ЗАГРУЗКИ ФОТО
   Причина съехавшего блока: <label> — строчный элемент, поэтому
   рамка и отступы схлопывались и текст наезжал на заголовок.
   ========================================================================= */
.updrop {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 4px;
  padding: 26px 20px;
  line-height: 1.5;
}

.updrop b { display: block; font-size: 14.5px; }
.updrop-ico { line-height: 1; }
.updrop * { pointer-events: none; }   /* клик по любому месту открывает выбор файла */

/* Сетка загруженных снимков */
.upgrid { clear: both; }
.upgrid:empty { display: none; margin: 0; }

.upitem img { background: var(--g50); }

/* Главное фото и кнопка выбора главного */
.upitem-main {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: var(--orange); color: #fff;
  font-size: 11px; font-weight: 700; text-align: center;
  padding: 4px 0; letter-spacing: .2px;
}

.upitem.is-main { border-color: var(--orange); box-shadow: 0 0 0 2px var(--orange-soft); }

.upitem-setmain {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, .62); color: #fff;
  font-size: 11px; font-weight: 600; text-align: center;
  padding: 4px 0; border: 0; cursor: pointer; width: 100%;
  opacity: 0; transition: opacity .15s;
}
.upitem:hover .upitem-setmain { opacity: 1; }
.upitem-setmain:hover { background: var(--orange); }

@media (hover: none) { .upitem-setmain { opacity: 1; } }

/* =========================================================================
   ГАЛЕРЕЯ НА СТРАНИЦЕ ТОВАРА
   ========================================================================= */
.pdp-main-img.has-photo {
  padding: 0;
  overflow: hidden;
  background: #fff;
  display: block;
  position: relative;
}

.pdp-main-img.has-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.pdp-thumb.has-photo {
  padding: 0;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
}

.pdp-thumb.has-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pdp-thumb.has-photo.active { border-color: var(--orange); box-shadow: 0 0 0 2px var(--orange-soft); }

.pdp-zoomhint { font-size: 11.5px; color: var(--g500); margin-top: 12px; }


/* =========================================================================
   ЛОГОТИП TERMINAL
   На больших экранах — полная версия, на планшетах и телефонах — только знак.
   ========================================================================= */
.hdr-logo { gap: 0; }
.hdr-logo-full { display: block; height: 34px; width: auto; }
.hdr-logo-mark-img { display: none; height: 38px; width: 38px; }

@media (max-width: 1150px) {
  .hdr-logo-full { height: 30px; }
}
@media (max-width: 900px) {
  .hdr-logo-full { display: none; }
  .hdr-logo-mark-img { display: block; height: 36px; width: 36px; }
}

/* Логотип в подвале и боковом меню, если понадобится */
.logo-terminal { height: 30px; width: auto; display: block; }

/* Кнопка выхода — внутри теперь SVG */
.btn-exit svg { display: block; }

/* =========================================================================
   ЛАЙТБОКС ФОТО ТОВАРА
   ========================================================================= */
.lb {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(16, 16, 16, .92);
  display: flex; align-items: center; justify-content: center;
  padding: 40px 64px;
}
.lb[hidden] { display: none; }

.lb-img {
  max-width: 100%; max-height: 100%;
  object-fit: contain; display: block;
  border-radius: 6px; background: #fff;
}

.lb-close {
  position: absolute; top: 16px; right: 18px;
  width: 42px; height: 42px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .14); color: #fff;
  font-size: 19px; cursor: pointer; line-height: 1;
}
.lb-close:hover { background: var(--orange); }

.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 64px; border: 0; border-radius: 9px;
  background: rgba(255, 255, 255, .14); color: #fff;
  font-size: 32px; line-height: 1; cursor: pointer;
}
.lb-nav:hover { background: var(--orange); }
.lb-prev { left: 12px; }
.lb-next { right: 12px; }

.lb-count {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
  color: #fff; font-size: 13px; letter-spacing: .4px;
  background: rgba(255, 255, 255, .12); padding: 5px 12px; border-radius: 20px;
}

@media (max-width: 640px) {
  .lb { padding: 56px 10px 56px; }
  .lb-nav { width: 40px; height: 52px; font-size: 26px; }
}

/* Кнопка сброса списков (избранное / сравнение) */
.listbar {
  display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap; margin-bottom: 18px;
}
.listbar-info { font-size: 13.5px; color: var(--g500); flex: 1; min-width: 200px; }


/* =========================================================================
   ЛОГОТИП НА МОБИЛЬНЫХ: полная версия вместо знака
   Переопределяет ранее заданное переключение на 900px.
   ========================================================================= */
@media (max-width: 900px) {
  .hdr-logo-full { display: block; height: 26px; }
  .hdr-logo-mark-img { display: none; }
}
@media (max-width: 480px) {
  .hdr-logo-full { height: 22px; }
}

/* Логотип в подвале */
.footer-logo-mark {
  width: 40px; height: 40px; border-radius: 9px;
  display: block; flex-shrink: 0;
}

/* Шрифт Gilroy для всех элементов шапки и форм */
.tbar, .hdr, .cnav, .mnav, .tabbar, button, input, select, textarea {
  font-family: var(--font);
}


/* =========================================================================
   АВАТАРЫ: шапка и профиль
   ========================================================================= */
.ava {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; overflow: hidden; flex-shrink: 0;
  object-fit: cover; background: var(--g200);
  color: #fff; font-weight: 800; line-height: 1;
  text-transform: uppercase; user-select: none;
}
.ava-24 { width: 24px; height: 24px; font-size: 11px; }
.ava-32 { width: 32px; height: 32px; font-size: 14px; }
.ava-40 { width: 40px; height: 40px; font-size: 17px; }
.ava-64 { width: 64px; height: 64px; font-size: 26px; }
.ava-96 { width: 96px; height: 96px; font-size: 38px; }
.ava-letter { letter-spacing: 0; }

/* Кнопка авторизации: аватар сверху, имя подписью снизу */
/* .btn-auth-col убран — аватар в шапке теперь без подложки, см. блок .umenu ниже */

.avaedit { display: flex; gap: 22px; flex-wrap: wrap; align-items: flex-start; }
.avaedit-stage {
  width: 180px; height: 180px; border-radius: 50%;
  background: var(--g100); border: 2px dashed var(--g200);
  overflow: hidden; position: relative; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.avaedit-stage canvas { display: block; width: 100%; height: 100%; border-radius: 50%; }
.avaedit-stage.is-empty canvas { display: none; }
.avaedit-empty {
  text-align: center; color: var(--g500); font-size: 12.5px;
  padding: 0 18px; line-height: 1.45;
}
.avaedit-ctl { flex: 1 1 260px; min-width: 240px; }
.avaedit-ctl label { display: block; font-size: 12.5px; font-weight: 700; margin-bottom: 6px; }
.avaedit-ctl input[type=range] { width: 100%; accent-color: var(--orange); }
.avaedit-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.avaedit-hint { font-size: 11.5px; color: var(--g500); margin-top: 10px; line-height: 1.5; }
.avaedit-mini { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.avaedit-mini span { font-size: 11.5px; color: var(--g500); }

@media (max-width: 560px) {
  .avaedit-stage { width: 140px; height: 140px; margin: 0 auto; }
  .avaedit { gap: 16px; }
}


/* =========================================================================
   АВАТАР В ШАПКЕ + ВЫПАДАЮЩЕЕ МЕНЮ ПРОФИЛЯ
   Без оранжевого прямоугольника при наведении: только тонкое кольцо.
   ========================================================================= */
.umenu { position: relative; display: flex; align-items: center; }

.umenu-btn {
  padding: 0; margin: 0; border: 0; background: none; cursor: pointer;
  line-height: 0; border-radius: 50%;
  display: block; -webkit-tap-highlight-color: transparent;
}
.umenu-btn:focus { outline: none; }
.umenu-btn .ava {
  box-shadow: 0 0 0 0 rgba(255, 107, 0, 0);
  transition: box-shadow .15s ease;
}
/* Подсветка — ровно кольцо 2px вокруг кружка */
.umenu-btn:hover .ava,
.umenu-btn:focus-visible .ava,
.umenu.is-open .umenu-btn .ava {
  box-shadow: 0 0 0 2px var(--orange);
}

.ava-36 { width: 36px; height: 36px; font-size: 15px; }

.umenu-drop {
  position: absolute; top: calc(100% + 10px); right: 0;
  min-width: 232px; background: #fff;
  border: 1px solid var(--g200); border-radius: 12px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .13);
  padding: 6px; z-index: 1200;
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity .14s ease, transform .14s ease, visibility .14s;
}
/* Невидимый мостик, чтобы меню не закрывалось в зазоре под аватаром */
.umenu-drop::before {
  content: ''; position: absolute; left: 0; right: 0; top: -12px; height: 12px;
}
.umenu:hover .umenu-drop,
.umenu.is-open .umenu-drop {
  opacity: 1; visibility: visible; transform: translateY(0);
}

.umenu-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--g100); margin-bottom: 6px; }
.umenu-name { font-size: 13.5px; font-weight: 800; line-height: 1.25; }
.umenu-mail { font-size: 11.5px; color: var(--g500); margin-top: 3px; word-break: break-all; }

.umenu-item {
  display: block; padding: 9px 12px; border-radius: 8px;
  font-size: 13px; font-weight: 600; color: var(--g900);
  transition: background .12s ease, color .12s ease;
}
.umenu-item:hover { background: var(--orange-soft); color: var(--orange-dark); }
.umenu-sep { height: 1px; background: var(--g100); margin: 6px 4px; }
.umenu-item-exit { color: var(--red); }
.umenu-item-exit:hover { background: #FDECEB; color: var(--red); }

@media (max-width: 900px) {
  .ava-36 { width: 32px; height: 32px; font-size: 14px; }
  .umenu-drop { right: -6px; min-width: 210px; }
}


/* =========================================================================
   ЛИПКАЯ КОМПАКТНАЯ ШАПКА ПРИ ПРОКРУТКЕ
   -------------------------------------------------------------------------
   Логика как на ВсеИнструменты: при прокрутке верхняя служебная полоса
   и каталожное меню уезжают, а основная строка приклеивается к верху:
   мини-логотип (птичка), Каталог, поиск, действия и профиль.

   Класс is-sticky вешается на <body> из assets/js/sticky.js.
   Компенсатор .hdr-spacer держит высоту, чтобы контент не подпрыгивал
   в момент отрыва шапки из потока.
   ========================================================================= */
.hdr-spacer { display: none; }

body.is-sticky .hdr {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1100;
  background: #fff;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .10);
  border-bottom: 1px solid var(--g200);
  animation: hdrDrop .18s ease-out;
}
@keyframes hdrDrop {
  from { transform: translateY(-100%); }
  to   { transform: translateY(0); }
}

/* Остаётся только самое необходимое */
body.is-sticky .tbar,
body.is-sticky .cnav { display: none; }

body.is-sticky .hdr-spacer { display: block; }

/* Строка становится ниже */
body.is-sticky .hdr-in { padding-top: 8px; padding-bottom: 8px; }

/* Логотип — только птичка */
body.is-sticky .hdr-logo-full { display: none; }
body.is-sticky .hdr-logo-mark-img {
  display: block; width: 38px; height: 38px;
}
body.is-sticky .hdr-logo { min-width: 0; margin-right: 4px; }

/* Поиск и кнопки компактнее */
body.is-sticky .hdr-search input { height: 40px; }
body.is-sticky .hdr-search-go   { height: 40px; }
body.is-sticky .hact2 { transform: scale(.94); }
body.is-sticky .umenu-btn .ava { width: 34px; height: 34px; }

@media (max-width: 900px) {
  body.is-sticky .hdr-logo-mark-img { width: 32px; height: 32px; }
  body.is-sticky .hdr-in { padding-top: 6px; padding-bottom: 6px; }
}
