/* ============================================================
   CholloGo · HOME · Navegación por categorías
   Solo afecta al lateral general de /index.php.
   ============================================================ */

.sidebar-left--home {
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .055);
}

.sidebar-left--home h3 {
  margin: 0;
  padding: 0;
  border: 0;
}

.home-category-panel {
  min-width: 0;
}

.home-category-panel__head {
  margin-bottom: 12px;
  padding: 3px 4px 13px;
  border-bottom: 1px solid #eef2f7;
}

.home-category-panel__eyebrow {
  display: block;
  margin-bottom: 3px;
  color: #15803d;
  font-size: .68rem;
  font-weight: 950;
  letter-spacing: .075em;
  line-height: 1.2;
  text-transform: uppercase;
}

.home-category-panel__head h3 {
  color: #0f172a;
  font-size: 1.12rem;
  font-weight: 950;
  letter-spacing: -.015em;
  line-height: 1.2;
}

.home-category-panel__head p {
  margin: 5px 0 0;
  color: #64748b;
  font-size: .76rem;
  line-height: 1.4;
}

.home-category-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.home-category-link {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: #f8fafc;
  color: #334155 !important;
  text-decoration: none !important;
  transition:
    background-color .16s ease,
    border-color .16s ease,
    color .16s ease,
    box-shadow .16s ease,
    transform .16s ease;
}

.home-category-link:hover {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534 !important;
  box-shadow: 0 5px 14px rgba(15, 23, 42, .045);
  transform: translateY(-1px);
}

.home-category-link.is-active {
  background: #ecfdf3;
  border-color: #86efac;
  color: #166534 !important;
  box-shadow: inset 3px 0 0 #22c55e;
}

.home-category-link--all {
  margin-bottom: 4px;
  background: #fff;
  border-color: #e2e8f0;
  font-weight: 900;
}

.home-category-link--all.is-active {
  background: #22c55e;
  border-color: #22c55e;
  color: #fff !important;
  box-shadow: 0 7px 16px rgba(34, 197, 94, .18);
}

.home-category-link__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid #e8edf3;
  border-radius: 9px;
  background: #fff;
  font-size: .88rem;
  line-height: 1;
}

.home-category-link.is-active:not(.home-category-link--all) .home-category-link__icon {
  border-color: #bbf7d0;
}

.home-category-link--all.is-active .home-category-link__icon {
  border-color: rgba(255,255,255,.26);
  background: rgba(255,255,255,.15);
  color: #fff;
}

.home-category-link__name {
  min-width: 0;
  overflow: hidden;
  color: inherit;
  font-size: .82rem;
  font-weight: 820;
  line-height: 1.25;
  text-overflow: ellipsis;
}

.home-category-link__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  min-height: 22px;
  padding: 2px 7px;
  border: 1px solid #edf1f5;
  border-radius: 999px;
  background: #fff;
  color: #64748b;
  font-size: .67rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.home-category-link.is-active:not(.home-category-link--all) .home-category-link__count {
  color: #15803d;
  border-color: #bbf7d0;
}

.home-category-link--all.is-active .home-category-link__count {
  color: #166534;
  border-color: transparent;
}

.home-category-more {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #eef2f7;
}

.home-category-more > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 38px;
  padding: 7px 9px;
  border-radius: 11px;
  color: #64748b;
  cursor: pointer;
  list-style: none;
  font-size: .76rem;
  font-weight: 900;
  transition: color .16s ease, background-color .16s ease;
}

.home-category-more > summary::-webkit-details-marker {
  display: none;
}

.home-category-more > summary::after {
  content: "⌄";
  margin-left: auto;
  color: #94a3b8;
  font-size: .9rem;
  transition: transform .16s ease;
}

.home-category-more[open] > summary::after {
  transform: rotate(180deg);
}

.home-category-more > summary:hover {
  color: #166534;
  background: #f8fafc;
}

.home-category-more > summary small {
  order: 2;
  min-width: 24px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: .65rem;
  text-align: center;
}

.home-category-list--secondary {
  margin-top: 7px;
}

.home-category-list--secondary .home-category-link {
  background: #fff;
  border-color: #f0f3f7;
}

.home-category-panel__empty {
  margin: 6px 4px;
  color: #94a3b8;
  font-size: .78rem;
}

/* Desktop: mismo lenguaje visual que los filtros especialista. */
@media (min-width: 1024px) {
  .sidebar-left--home {
    flex: 0 0 245px;
    width: 245px;
    position: sticky;
    top: 94px;
    max-height: calc(100vh - 112px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
  }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1023px) {
  .sidebar-left--home {
    flex: 0 0 230px;
    width: 230px;
    position: sticky;
    top: 168px;
    max-height: calc(100vh - 184px);
    overflow-y: auto;
  }
}

/* Móvil: reutiliza el drawer existente de integrado.css. */
@media (max-width: 767px) {
  .sidebar-left--home {
    width: auto;
    padding: 16px;
    border-radius: 20px;
  }

  .sidebar-left--home .home-category-panel__head {
    position: sticky;
    top: -16px;
    z-index: 2;
    margin: -16px -16px 12px;
    padding: 15px 16px 12px;
    background: #fff;
    border-bottom: 1px solid #eef2f7;
  }

  .home-category-panel__head h3 {
    font-size: 1.08rem;
  }

  .home-category-panel__head p {
    font-size: .78rem;
  }

  .home-category-link {
    grid-template-columns: 32px minmax(0, 1fr) auto;
    min-height: 46px;
    padding: 7px 10px;
  }

  .home-category-link__icon {
    width: 32px;
    height: 32px;
  }

  .home-category-link__name {
    font-size: .86rem;
  }
}
