/* ============================================================
   Кнопка «Меню» в шапке (заменяет старый quicknav-ряд)
   ============================================================ */
.pbtop-row { position: relative; }

.pbg-menu-trigger-wrap {
  display: inline-flex;
  align-items: center;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
}

.pbg-menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px;
  height: 36px;
  background: radial-gradient(100% 100% at 50% 0, rgba(79, 234, 159, .18) 0%, rgba(56, 100, 79, .18) 100%), linear-gradient(1deg, #25252e 30%, #292932 100%);
  border: 1px solid rgba(93, 186, 141, .35);
  border-radius: 10px;
  color: #4fea9f;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: .3px;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, color .18s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .28);
}
.pbg-menu-trigger i { font-size: 17px; line-height: 0; }
.pbg-menu-trigger:hover {
  border-color: rgba(93, 186, 141, .7);
  box-shadow: 0 4px 16px rgba(79, 234, 159, .18);
}
.pbg-menu-trigger[aria-expanded="true"] {
  background: linear-gradient(228deg, #4ace8e2b 10%, #4ace8e4d 100%);
  color: #6fe5ab;
}

@media (max-width: 991.98px) {
  .pbg-menu-trigger-wrap {
    position: static;
    transform: none;
    margin-left: auto;
  }
}

@media (max-width: 767.98px) {
  html body .wapper .header.pbtop .header-logo.pbtop-logo {
    display: none;
  }
  .pbg-menu-trigger-wrap {
    margin-left: 0;
  }
}

@media (max-width: 575.98px) {
  .pbg-menu-trigger span { display: none; }
  .pbg-menu-trigger { padding: 0 11px; gap: 0; }
}

/* ============================================================
   Панель «Меню» — выезжает сверху во всю ширину
   ============================================================ */
.pbg-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  z-index: 1299;
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s ease;
}
.pbg-menu-overlay.is-open { opacity: 1; pointer-events: all; }

.pbg-menu-panel {
  position: fixed;
  top: 0; left: 0; right: 0;
  max-height: 88vh;
  overflow-y: auto;
  z-index: 1300;
  background: linear-gradient(1deg, #202027 30%, #24242c 100%);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  box-shadow: 0 16px 44px rgba(0, 0, 0, .55);
  transform: translateY(-100%);
  transition: transform .32s cubic-bezier(.4, 0, .2, 1);
}
.pbg-menu-panel.is-open { transform: translateY(0); }
body.pbg-menu-active { overflow: hidden; }

.pbg-menu-panel::-webkit-scrollbar { width: 5px; }
.pbg-menu-panel::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .16); border-radius: 4px; }

.pbg-menu-panel__head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 24px;
  background: linear-gradient(1deg, #202027 30%, #24242c 100%);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.pbg-menu-panel__title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  flex: 1 1 0;
  min-width: 0;
}
.pbg-menu-panel__title i { font-size: 20px; color: #4fea9f; }

.pbg-menu-home-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 16px;
  border-radius: 9px;
  background: linear-gradient(228deg, #4ace8e2b 10%, #4ace8e4d 100%);
  border: 1px solid rgba(93, 186, 141, .35);
  color: #4fea9f;
  font-size: 12.5px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.pbg-menu-home-btn i { font-size: 16px; line-height: 0; }
.pbg-menu-home-btn:hover {
  background: linear-gradient(228deg, #4ace8e40 10%, #4ace8e63 100%);
  border-color: rgba(93, 186, 141, .7);
  color: #6fe5ab;
  text-decoration: none;
}

.pbg-menu-panel__actions {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.pbg-menu-panel__close {
  flex: 0 0 auto;
  width: 34px; height: 34px;
  border-radius: 9px;
  background: rgba(255, 255, 255, .06);
  border: none;
  color: #8a8c9e;
  font-size: 19px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
}
.pbg-menu-panel__close:hover { background: rgba(255, 255, 255, .12); color: #fff; }

.pbg-menu-panel__body {
  padding: 20px 24px 26px;
}

.pbg-menu-loading, .pbg-menu-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: #6c79a3;
  font-size: 24px;
}
.pbg-menu-empty { font-size: 13px; }

/* ---- Одиночные пункты (без категории) — всегда 1 в ряд, макс. 4, свой премиальный вид ---- */
.pbg-menu-singles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 12px;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.pbg-menu-singles .pbg-menu-item {
  position: relative;
  height: 64px;
  padding: 0 16px;
  gap: 13px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .07);
  background: linear-gradient(135deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .015));
  overflow: hidden;
}
.pbg-menu-singles .pbg-menu-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--pbg-item-icon, #4fea9f) 14%, transparent), transparent 60%);
  opacity: .8;
  pointer-events: none;
}
.pbg-menu-singles .pbg-menu-item:has(.pbg-menu-item__icon--img)::before {
  display: none;
}
.pbg-menu-singles .pbg-menu-item:hover {
  border-color: color-mix(in srgb, var(--pbg-item-glow, var(--pbg-item-icon, #4fea9f)) 45%, transparent);
  background: linear-gradient(135deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .02));
  transform: translateY(-2px);
}
.pbg-menu-singles .pbg-menu-item--glow:hover {
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--pbg-item-glow, #4fea9f) 30%, transparent),
    0 10px 26px -6px color-mix(in srgb, var(--pbg-item-glow, #4fea9f) 60%, transparent),
    0 0 28px -4px color-mix(in srgb, var(--pbg-item-glow, #4fea9f) 55%, transparent);
}

.pbg-menu-singles .pbg-menu-item__icon {
  position: relative;
  z-index: 1;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-size: 20px;
  background: color-mix(in srgb, var(--pbg-item-icon, #4fea9f) 15%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pbg-item-icon, #4fea9f) 22%, transparent);
}
.pbg-menu-singles .pbg-menu-item__icon--img {
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1);
}
.pbg-menu-singles .pbg-menu-item__text {
  position: relative;
  z-index: 1;
}
.pbg-menu-singles .pbg-menu-item__title {
  font-size: 13.5px;
  font-weight: 800;
}

/* ---- Сетка категорий ---- */
.pbg-menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 22px;
}

.pbg-menu-col {
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, .015);
}

.pbg-menu-col__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  color: #f0f1f8;
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: .01em;
}
.pbg-menu-col__head i {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--pbg-cat-icon, #4fea9f) 16%, transparent);
  color: var(--pbg-cat-icon, #4fea9f);
  font-size: 16px;
}
.pbg-menu-col__dot { display: none; }

.pbg-menu-col__items {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.pbg-menu-col__items--grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ---- Карточка пункта ---- */
.pbg-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 52px;
  padding: 0 12px;
  box-sizing: border-box;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, .05);
  background: rgba(255, 255, 255, .02);
  text-decoration: none;
  transition: border-color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease;
}
.pbg-menu-item:hover {
  text-decoration: none;
  background: rgba(255, 255, 255, .045);
  transform: translateY(-1px);
}

.pbg-menu-item--glow:hover {
  border-color: color-mix(in srgb, var(--pbg-item-glow, #4fea9f) 55%, transparent);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--pbg-item-glow, #4fea9f) 25%, transparent),
    0 6px 20px -4px color-mix(in srgb, var(--pbg-item-glow, #4fea9f) 55%, transparent),
    0 0 24px -6px color-mix(in srgb, var(--pbg-item-glow, #4fea9f) 65%, transparent);
}

.pbg-menu-item--glow:hover .pbg-menu-item__icon:not(.pbg-menu-item__icon--img) {
  background: color-mix(in srgb, var(--pbg-item-glow, var(--pbg-item-icon, #4fea9f)) 18%, transparent);
  box-shadow: 0 0 14px -2px color-mix(in srgb, var(--pbg-item-glow, #4fea9f) 70%, transparent);
}

.pbg-menu-item__icon {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 9px;
  background: rgba(255, 255, 255, .04);
  color: var(--pbg-item-icon, #4fea9f);
  font-size: 17px;
  transition: background .18s ease, box-shadow .18s ease;
}

.pbg-menu-item__icon--img {
  background: transparent;
  overflow: hidden;
  padding: 0;
  border-radius: 9px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.pbg-menu-item__icon--img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}

.pbg-menu-item__text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.pbg-menu-item__title {
  color: #f0f1f8;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pbg-menu-item__subtitle {
  color: #7c7f92;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- Вариант «2 в ряд» (только для пунктов внутри категорий): иконка сверху по центру, текст под ней ---- */
.pbg-menu-col__items--grid2 .pbg-menu-item {
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: auto;
  min-height: 92px;
  padding: 14px 10px;
  text-align: center;
}

.pbg-menu-col__items--grid2 .pbg-menu-item__icon {
  width: 38px;
  height: 38px;
  font-size: 19px;
}

.pbg-menu-col__items--grid2 .pbg-menu-item__text {
  align-items: center;
  width: 100%;
}

.pbg-menu-col__items--grid2 .pbg-menu-item__title,
.pbg-menu-col__items--grid2 .pbg-menu-item__subtitle {
  max-width: 100%;
  white-space: normal;
  text-align: center;
}

/* ============================================================
   Мобильная адаптация
   ============================================================ */
@media (max-width: 767.98px) {
  .pbg-menu-panel { max-height: 100vh; }
  .pbg-menu-panel__head { padding: 14px 16px; }
  .pbg-menu-panel__body { padding: 16px 16px 22px; }
  .pbg-menu-grid { grid-template-columns: 1fr 1fr; gap: 18px; }
  .pbg-menu-singles { grid-template-columns: 1fr; }
  .pbg-menu-home-btn span { display: none; }
  .pbg-menu-home-btn { padding: 0 10px; }
}

@media (max-width: 480px) {
  .pbg-menu-grid { grid-template-columns: 1fr; }
}
