/* =========================
   BACKDROP
========================= */
.ghm-backdrop{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  z-index: 9998;
}
.ghm-backdrop.ghm-active{
  opacity: 1;
  pointer-events: auto;
}

/* =========================
   SIDEBAR PANEL (Journal)
========================= */
.ghm-sidebar-panel{
  position: fixed;
  top: 0;
  left: 0;
  width: 340px;
  max-width: 92vw;
  height: 100%;
  background: #fff;
  z-index: 9999;

  transform: translate3d(-100%,0,0);
  transition: transform .25s cubic-bezier(.4,0,.2,1);
  will-change: transform;

  display: flex;
  flex-direction: column;
  box-shadow: 10px 0 40px rgba(0,0,0,.15);
}
.ghm-sidebar-panel.ghm-active{
  transform: translate3d(0,0,0);
}

/* =========================
   HEADER
========================= */

.ghm-sidebar-header {
  position: relative;
  padding: 6px 16px 4px;
  background: #2F4373;
  color: white;
  height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center; 
  justify-content: center;
}
.ghm-logo-wrapper {
    width: 100%;
  display: flex;
  justify-content: center;
  

}
.ghm-logo {
  height: auto;
  object-fit: contain;

}

/* =========================
   BODY (scroll)
========================= */
.ghm-sidebar-body{
  flex: 1;
  overflow-y: auto;
  padding: 14px 14px 18px;
}

/* scrollbar (opcional, estilo suave) */
.ghm-sidebar-body::-webkit-scrollbar{ width: 8px; }
.ghm-sidebar-body::-webkit-scrollbar-thumb{ background: #d8d8d8; border-radius: 8px; }
.ghm-sidebar-body::-webkit-scrollbar-track{ background: transparent; }

/* =========================
   LISTA CATEGORIAS
========================= */
.ghm-menu-list{
  list-style: none;
  padding: 0;
  margin: 0;
}

.ghm-menu-parent{
  margin: 0 0 10px 0;
}

/* item principal */
.ghm-menu-item{
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 10px 10px;
  border-radius: 12px;
  background: transparent;
  transition: background .15s ease;
}
.ghm-menu-item:hover{
  background: #f5f5f5;
}

/* lado izquierdo */
.ghm-menu-left{
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.ghm-menu-left img{
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #f3f3f3;
  object-fit: cover;
  flex: 0 0 auto;
  border: 1px solid #e6e6e6;
}

.ghm-title{
  font-size: 15px;
  font-weight: 500;
  color: #2a2a2a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* badge redondo */
.ghm-badge{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  height: 20px;
  min-width: 20px;
  padding: 0 7px;

  border-radius: 999px;
  background: #e6e6e6;
  color: #444;
  font-size: 12px;
  font-weight: 500;
  margin-left: 6px;
}

/* botón flecha circular */
.ghm-toggle-btn{
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e9e9e9;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  font-size: 14px;
  color: #333;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.ghm-toggle-btn:hover{
  background: #dedede;
}
.ghm-toggle-btn.ghm-rot{
  transform: rotate(180deg);
}

/* =========================
   SUBMENU (Journal style)
========================= */

.ghm-submenu {
  position: relative;
  max-height: 0;
  overflow: hidden;
  transition: 0.3s ease;
  margin-left: 23px; /* mitad del círculo */
  padding-left: 35px; /* espacio para texto */
}
.ghm-submenu::before {
  content: "";
  position: absolute;
  top: 0;
  left: 5px; /* centro del círculo */
  width: 2px;
  height: 100%;
  background: #ddd;
}
.ghm-submenu.ghm-open{
  max-height: 500px;
}

.ghm-submenu li{
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 6px 0;
  font-size: 14px;
  color: #666;
}

/* badge dentro del submenu más pequeño */
.ghm-submenu .ghm-badge{
  background: #ededed;
  height: 18px;
  min-width: 18px;
  font-size: 11px;
  padding: 0 6px;
}

/* =========================
   BLOQUE GRIS INFERIOR
========================= */
.ghm-extra-section{
  margin-top: 18px;
  background: #ededed;
  border-radius: 12px;
  padding: 16px 16px 12px;
}

.ghm-extra-link{
  display: block;
  padding: 10px 0;
  text-decoration: none;
  font-size: 14px;
  color: #2f2f2f;
}
.ghm-extra-link:hover{
  color: #0d6efd;
}

.ghm-divider{
  height: 1px;
  background: #d6d6d6;
  margin: 10px 0 12px;
}

/* bottom links con icono */
.ghm-bottom-links{
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ghm-bottom-item{
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #2f2f2f;
  font-size: 14px;
}
.ghm-bottom-item:hover{
  color: #0d6efd;
}
.ghm-icon{
  width: 22px;
  text-align: center;
  opacity: .85;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 420px){
  .ghm-sidebar-panel{ width: 92vw; }
}
.ghm-toggle-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e9e9e9;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s ease;
}

.ghm-toggle-btn:hover {
  background: #dedede;
}

.ghm-icon-arrow {
  width: 16px;
  height: 16px;
  stroke: #555;
  stroke-width: 2.5;
  fill: none;
  transition: transform .25s ease;
}

/* Cuando está abierto */
.ghm-toggle-btn.ghm-open .ghm-icon-arrow {
  transform: rotate(90deg);
}



/* Menú más pequeño */
/* .ghm-header-title {
  font-size: 13px;
  font-weight: 600;
  margin-top: 8px;
  letter-spacing: 2px;
  opacity: 0.85;
} */
/* .ghm-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #dcdcdc;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.2s ease;
} */
/* Botón cerrar más elegante */
.ghm-close-btn {
  position: absolute;
  top: 12px;
  right: 14px;
  background: rgba(255,255,255,0.18);
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
}

.ghm-close-btn:hover {
  background: #cfcfcf;
}
.ghm-close-icon {
  width: 20px;
  height: 20px;
  stroke: white;
  stroke-width: 2;
  fill: none;
}

/* .ghm-close-icon {
  width: 16px;
  height: 16px;
  stroke: #555;
  stroke-width: 2;
  fill: none;
} */


/* =========================================
   SUBCATEGORÍAS DEL MENÚ LATERAL
========================================= */

.ghm-subcategory-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  border-radius: 8px;
  position: relative;
  transition: all 0.25s ease;
}

/* Hover elegante */
.ghm-subcategory-link:hover {
  background: #f3f6ff;
  color: #0d6efd;
  transform: translateX(4px);
}

/* Estado activo */
.ghm-subcategory-link.active {
  background: #e9f2ff;
  color: #0d6efd;
  font-weight: 600;
}

/* Indicador lateral tipo marketplace */
.ghm-subcategory-link.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 4px;
  background: #0d6efd;
  border-radius: 4px;
}