/*
  Sidebar v 1.1;
  11/2023;
  João Diogo Pereira;
*/

.woocommerce__sidebar .sidebar{
  transform: translatex(0);
  transition: all .3s ease-in-out;
}

.woocommerce__sidebar .sidebar.open{
  transform: translatex(0);
}

.woocommerce__sidebar .sidebar .sidebar__close{
  text-align: right;
  display: none;
}

.woocommerce__sidebar .sidebar .sidebar__close svg{
  fill: #29313e;
  width: 24px;
  height: 24px;
}

@media only screen and (max-width: 992px){
  .woocommerce__sidebar{
    z-index: 1;
  }

  .woocommerce__sidebar .sidebar{
    background: var(--secondaryColor);
    height: calc(100vh - var(--headerHeight));
    width: 40vw;
    position: fixed;
    top: var(--headerHeight);
    right: 0;
    padding: 1rem;
    overflow: auto;
    transform: translateX(40vw);
  }

  .woocommerce__sidebar .sidebar.scrolled{
    height: calc(100vh - var(--headerHeightScrolled));
    top: var(--headerHeightScrolled);
  }

  .woocommerce__sidebar .sidebar .sidebar__close{
    display: block;
  }
}

@media only screen and (max-width: 767px){
  .woocommerce__sidebar .sidebar{
    width: 100vw;
    transform: translateX(100vw);
    height: calc(100vh - var(--headerHeightMobile));
    top: var(--headerHeightMobile);
  }

  .woocommerce__sidebar .sidebar.scrolled{
    height: calc(100vh - var(--headerHeightMobile));
    top: var(--headerHeightMobile);
  }
}