/* ===== OFFCANVAS LATERAL ===== */

.crecima-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 320px;
  max-width: 100%;
  height: 100vh;
  background: #ffffff;
  box-shadow: 0 0 30px rgba(0, 0, 0, .15);
  transform: translateX(-100%);
  opacity: 0;
  visibility: hidden;
  transition:
    transform .25s ease,
    opacity .25s ease,
    visibility .25s ease;
  z-index: 99999;
  display: flex;
  flex-direction: column;
}

.crecima-menu.is-open {
  transform: translateX(0);
  opacity: 1;
  visibility: visible;
}

body.crecima-menu-open {
  /* overflow: hidden; */
}

/* Overlay del menú lateral */
.crecima-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .4);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
  z-index: 9998;
}

.crecima-menu-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

/* Header del menú */
.offcanvas-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 28px;
  background: var(--Neutral-800, #1A1A1A);

  & a {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-direction: row;
    gap: 7px;
    color: white;
  }

  & svg {
    display: flex;
  }

  & a h5.offcanvas-title {
    margin: 0;
    color: var(--neutral-0, #FFF);
    font-size: 14px;
    font-weight: 700;
    line-height: 150%;
  }

  & a p {
    color: var(--neutral-0, #FFF);
    font-size: 10px;
    font-weight: 500;
    line-height: 150%;
    margin: 0;
  }
}

.offcanvas-header .crecima-menu-close {
  border: 0;
  position: absolute;
  right: 14px;
  margin: 0;
  padding: 0;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.offcanvas-header .crecima-menu-close:hover,
.offcanvas-header .crecima-menu-close:focus {
  background: transparent;
}

/* Botón de cerrar */
.crecima-menu-close {
  border: 0;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  margin-right: 8px;
}

/* Cuerpo del menú */

.crecima #crecima-menu .offcanvas-body {
  flex: 1;
  overflow-y: auto;
  padding: 33px 0;
}

@media(max-width:767px) {
  .crecima #crecima-menu .offcanvas-body {
    padding: 13px 0 30px;
  }
}

/* Botón flotante para abrir menú */
.crecima button.btn-menu-lateral {
  border: 0 !important;
  padding: 0 !important;
  align-items: center;
  gap: 8px;
  display: flex !important;
  width: 40px;
  height: 40px;
  justify-content: center;
  align-items: center;
}

.crecima button.btn-menu-lateral:hover,
.crecima button.btn-menu-lateral:focus {
  background: transparent !important;
}

.btn-menu-lateral svg {
  display: flex;
}

/* ===== COLLAPSE CATEGORÍAS ===== */

.collapse {
  max-height: 0;
  overflow: hidden;
  transition: max-height .25s ease;
}

.collapse.show {
  max-height: 800px;
  /* ajustá según cantidad de categorías */
}

/* Botón acordeón categorías */
.crecima #crecima-menu button.btn-menu-acordeon {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 0;
  background: transparent;
  padding: 10px 27px;

  color: var(--neutral-950, #1F1F1F);
  font-size: 18px;
  font-weight: 600;
  line-height: 150%;
}

.btn-menu-acordeon svg {
  transition: transform .2s ease;
}

.btn-menu-acordeon[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

/* Ítems de la lista */
.list-menu-cre {
  list-style: none;
  margin: 0;
  padding: 0;
}

.list-menu-cre a {
  text-decoration: none;
}


.crecima #crecima-menu .list-group {
  padding: 0;
}

.crecima #crecima-menu .list-group>li:not(:first-child) a:not(.btn-principal) {
  border-top: 1px solid #BFBFBF;
  color: var(--neutral-950, #1F1F1F);
  font-size: 18px;
  font-weight: 600;
  line-height: 150%;
  padding: 24px 27px;
  display: block;
}

.crecima #crecima-menu .menu-iniciar-sesion {
  border-top: 1px solid #BFBFBF;
  padding: 27px;
}

/* UL de categorías */
.crecima #crecima-menu .ul-cate-padres {
  list-style: none;
  margin: 0;
  padding-left: 0;
  padding-bottom: 14px;
}

.crecima #crecima-menu .categoras-menu-lateral a {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 15px 27px;

  color: var(--Color-Text-tx-primary-2, #222);
  font-size: 16px;
  font-weight: 500;
  line-height: 150%;

  & svg {
    width: 24px;
    height: 24px;
  }

  & svg path {
    fill: #222;
  }
}


/* Ejemplo de animación barra de carga (ajustar a tu CSS actual) */
.barracarga {
  position: fixed;
  left: 0;
  top: 0;
  height: 3px;
  width: 0;
  background: #000;
  z-index: 10000;
}

.barracarga.is-active {
  animation: barra-carga 0.5s ease-out forwards;
}

@keyframes barra-carga {
  from {
    width: 0;
  }

  to {
    width: 100%;
  }
}