.all-categories_wraper {
  position: absolute;
  width: 100%;
  background-color: #FCF0D8;
  z-index: 100;
}

.all-categories_wraper #all-categories {
  display: grid;
  grid-template-columns: 280px auto;
  gap: 24px;
  padding: 24px 40px;
  max-width: 1920px;
  margin: 0 auto;
}

.all-categories_wraper #catalog-scroll-wrap {
  border-radius: 16px;
  overflow: hidden;
  height: fit-content;
}

.all-categories_wraper #cat_accordion {
  max-height: 512px;
  padding: 16px 0;
  margin: 0;
  background: #FEFEFE;
  border-radius: 16px;
  overflow-y: auto;
}

.all-categories_wraper #cat_accordion li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 24px;
  font-size: 14px;
  line-height: 18px;
  font-weight: 700;
  cursor: pointer;
}

.all-categories_wraper #cat_accordion li svg {
  width: 8px;
  height: 9px;
  margin-left: auto;
}

.all-categories_wraper #cat_accordion li:hover,
.all-categories_wraper #cat_accordion li.active {
  color: var(--red);
  background-color: #fdf7eb;
}

.all-categories_wraper .special-proposals-wrap {
  position: relative;
}

.all-categories_wraper #special_proposals_header {
  padding-bottom: 28px;
}

.all-categories_wraper .special-proposals-wrap .img-wrap {
  position: relative;
}

.all-categories_wraper .special-proposals-wrap .img-wrap > a:not(.btn) {
  display: block;
  height: 100%;
}

.all-categories_wraper .special-proposals-wrap a.btn {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  height: 48px;
}

.all-categories_wraper .special-proposals-wrap a.btn:hover {
  background-color: var(--hover-btn);
  color: var(--white);
}

.all-categories_wraper .special-proposals-wrap a.btn:hover svg {
  color: var(--white);
}

.all-categories_wraper .special-proposals-wrap a.btn svg {
  width: 9px;
  height: 8px;
  transform: rotate(-90deg);
}

.all-categories_wraper #cat_accordion li > span {
  margin-left: auto;
}

.all-categories_wraper .special-proposals-wrap img {
  border-radius: 16px;
}

.all-categories_wraper .special-proposals-wrap .owl-controls {
  margin: 0;
}

.all-categories_wraper .special-proposals-wrap #special_proposals_header .owl-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  transform: translateY(0);
}

.sub_cat_menu {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  height: 100%;
}

.sub_cat_menu .sub_cat {
  display: flex;
  height: 165px;
  background-color: var(--white);
  border-radius: 16px;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  text-align: center;
}

.sub_cat_menu .sub_cat .img-container {
  height: 88px;
  /*width: 64px;*/
  transform: translateY(5px);
}
.sub_cat_menu .sub_cat .img-container img {
  object-fit: cover;
  border-radius: 16px;
}

.sub_cat_menu .sub_cat a {
  font-size: 14px;
  font-weight: 700;
  line-height: 18px;
  min-height: 34px;
}

.categories-title,
.close-subcategory {
  display: none;
}

.all-categories_wraper .tabs-wrap {
  display: grid;
  grid-template-columns: auto 280px;
  gap: 24px;
}


@media (max-width: 1600px) {
  .sub_cat_menu {
    grid-template-columns: repeat(4, minmax(140px, 1fr));
  }

  .sub_cat_menu .sub_cat  {
    min-height: 140px;
    height: auto;
  }
}

@media (max-width: 1300px) {
  .all-categories_wraper #cat_accordion {
    max-height: 594px;
  }
  .all-categories_wraper #all-categories {
    padding: 16px;
  }
  .sub_cat_menu {
    grid-template-columns: repeat(3, minmax(130px, 1fr));
  }
}

@media (max-width: 1200px) {
  .special-proposals-wrap:has(#special_proposals_header) {
    display: none;
  }

  .all-categories_wraper #all-categories {
    grid-template-columns: 280px auto;
  }

  .sub_cat_menu .sub_cat  {
    min-height: 150px;
  }

  .all-categories_wraper .tabs-wrap {
    grid-template-columns: auto;
  }
}

@media (max-width: 740px) {
  .sub_cat_menu {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
  }
}

@media (max-width: 600px) {
  .all-categories_wraper:has(#all-categories:not(.hidden)) {
    position: fixed;
    left: 0;
    top: 0;
    height: 100dvh;
    z-index: 1000;
  }

  .all-categories_wraper #all-categories {
    display: flex;
    flex-direction: column;
  }

  .all-categories_wraper #catalog-scroll-wrap {
    background-color: var(--white);
  }

  .all-categories_wraper  #all-categories,
  .all-categories_wraper #catalog-scroll-wrap {
    height: 100dvh;
  }

  .all-categories_wraper  #all-categories {
    padding: 0;
  }

  .all-categories_wraper #cat_accordion {
    max-height: 100dvh;
    width: 100%;
  }

  .all-categories_wraper #cat_accordion li {
    padding: 16px;
  }

  .all-categories_wraper .tabs-wrap {
    position: absolute;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100dvh;
    max-height: 100dvh;
    padding: 16px;
    transform: translateX(-100%);
    background-color: #fcf0d8;
    overflow-y: auto;
    z-index: 1;
    transition: transform .3s ease;
  }

  .all-categories_wraper .tabs-wrap:has(.tab-content .active) {
    transform: translateX(0);
  }

  .close-subcategory {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 40px;
    width: 100%;
    padding: 0;
    margin-bottom: 16px;
    background-color: transparent;
    border: 0;
    font-family: 'Cy Grotesk Key';
    font-size: 24px;
    line-height: 26px;
    font-weight: 500;
    text-align: left;
  }

  .categories-title button *,
  .close-subcategory * {
    pointer-events: none;
  }

  .categories-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px 0;
    font-family: 'Cy Grotesk Key';
    font-size: 24px;
    line-height: 26px;
    font-weight: 500;
  }

  .categories-title button {
    display: flex;
    align-items: center;
    padding: 0 16px;
    border: 0;
    background-color: transparent;
    transform: translateX(16px);
  }

  .all-categories_wraper .scroll-shadows.shadow-top::before {
    transform: translateY(40px);
  }

  .special-proposals-wrap:has(#special_proposals_header) {
    display: block;
  }

  .all-categories_wraper .special-proposals-wrap .owl-item { /* it helps with dots position if an image has height: auto; */
    height: 0;
  }    
  .all-categories_wraper .special-proposals-wrap .owl-item.active { /* it helps with dots position if an image has height: auto; */
    height: auto;
  }

  .all-categories_wraper .special-proposals-wrap img {
    width: 100%;
    height: auto;
  }  
}

.sub_cat_menu .cat_link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 150px;
  border-radius: 16px;
}

.sub_cat_menu .cat_link a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 100%;
  font-size: 14px;
  text-align: center;
  line-height: 18px;
  font-weight: 700;
  color: var(--red);
}

.sub_cat_menu .sub_cat:hover a {
  color: #E43F4A;
  text-decoration: none; 
}

.sub_cat_menu .cat_link {
  background-color: transparent;
  border: 2px solid #DBC8B3;
  justify-content: center;
}

.sub_cat_menu .cat_link a {
  display: flex;
  flex-direction: column;
  background-color: transparent;
} 
