body.no-scroll {
  overflow: hidden;
}

/* Price slider */
.price-slider {
  border-top: 1px solid var(--neutral200);
  border-bottom: 1px solid var(--neutral200);
  padding: 32px 0;
  color: var(--primary500);
}

.price-slider {
  .wrapper {
    position: relative;
  }

  .container {
    position: relative;
    width: 100%;
    height: 42px;
    /* margin-top: 16px; */
    padding: 0;
  }

  input[type="range"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 100%;
    outline: none;
    position: absolute;
    margin: auto;
    top: 0;
    bottom: 0;
    background-color: transparent;
    pointer-events: none;
  }

  .slider-track {
    width: 100%;
    height: 4px;
    position: absolute;
    margin: auto;
    top: 0;
    bottom: 0;
    border-radius: 5px;
  }

  input[type="range"]::-webkit-slider-runnable-track {
    -webkit-appearance: none;
    height: 4px;
  }

  input[type="range"]::-moz-range-track {
    -moz-appearance: none;
    height: 4px;
  }

  input[type="range"]::-ms-track {
    appearance: none;
    height: 4px;
  }

  input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 14px;
    width: 14px;
    border: 2px solid var(--primary500);
    background-color: var(--black_white50);
    cursor: pointer;
    margin-top: -5px;
    pointer-events: auto;
    border-radius: 50%;
  }

  input[type="range"]::-moz-range-thumb {
    -webkit-appearance: none;
    height: 14px;
    width: 14px;
    cursor: pointer;
    border-radius: 50%;
    background-color: var(--primary500);
    border: 2px solid var(--primary500);
    pointer-events: auto;
    border: none;
  }

  input[type="range"]::-ms-thumb {
    appearance: none;
    height: 14px;
    width: 14px;
    cursor: pointer;
    border-radius: 50%;
    background-color: var(--primary500);
    pointer-events: auto;
  }

  input[type="range"]:active::-webkit-slider-thumb {
    background-color: var(--black_white50);
    border: 2px solid var(--primary500);
  }

  #range1,
  #range2 {
    pointer-events: none;
    white-space: nowrap;
  }

  .values {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    color: var(--black_white950);
  }

  /* button */
  .primary-btn-large {
    height: 40px;
  }
}

/* main content */
.shop-main {
  display: flex;
  gap: 40px;
  padding: 32px 50px 100px;
  transition: padding 0.4s ease, gap 0.4s ease;
}

.all-products-wrapper {
  /* display: flex;
  flex-wrap: wrap; */
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* left side */
.shop-categories-wrapper {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.shop-categories-wrapper {
  .shop-filter-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    background: var(--black_white50);
    color: var(--black_white950);
    border: 1px solid var(--neutral200);
    border-radius: 8px;
    padding: 10px 16px;
    width: -webkit-max-content;
    width: -moz-max-content;
    width: max-content;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    transition: color 0.4s ease, border-color 0.4s ease;
  }

  .shop-filter-toggle:hover {
    color: var(--primary500);
    border-color: var(--primary500);
    cursor: pointer;
  }

  .shop-filter-toggle svg {
    height: 20px;
    width: 20px;
    min-width: 20px;
    min-height: 20px;
  }

  .mobile-filter-title {
    display: none;
  }

  .close-mobile-filter {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--black_white950);
    transition: color 0.4s ease;
  }

  .close-mobile-filter:hover {
    color: var(--primary500);
  }

  .close-mobile-filter svg {
    width: 26px;
    height: 26px;
  }

  .mobile-title-wrapper,
  .sortby-filter {
    display: none;
  }
}

.shop-l {
  display: flex;
  flex-direction: column;
  gap: 32px;
  min-width: 301px;
}

.shop-l {
  .extra-categories-img {
    height: 40px;
    width: 40px;
  }

  .extra-categories-img img {
    height: 22.86px;
    width: 22.86px;
  }

  .extra-categories-desktop {
    margin-bottom: 32px;
  }

  .extra-categories-desktop a .body-sm-regular {
    padding: 0 12px;
  }

  .categories-title {
    color: var(--primary500);
    margin-bottom: 16px;
  }

  .product-categories-shop {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  /* Each parent item */
  .product-categories-shop>li {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    position: relative;
  }

  .product-categories-shop>li:not(:has(.plus-icon)) {
    margin-left: 26px;
  }

  /* Category link next to icon */
  .product-categories-shop>li>a,
  .child-categories-shop li a {
    flex: 1;
    color: var(--neutral600);
    transition: color 0.4s ease;
  }

  .product-categories-shop>li>a:hover,
  .product-categories-shop>li.open>a,
  .child-categories-shop li a:hover,
  .child-categories-shop li.open a {
    color: var(--primary500);
  }

  /* Subcategories — placed below main line */
  .product-categories-shop>.parent-category>ul.child-categories-shop {
    width: 100%;
    /* forces it onto new line */
    margin: 6px 0 0 16px;
    display: none;
    flex-direction: column;
    gap: 12px;
  }

  .product-categories-shop>.parent-category.open>ul.child-categories-shop {
    display: flex;
  }
  .product-categories-shop>.parent-category.open>ul.child-categories-shop li {
    display: flex;
  }

  /* .child-categories-shop li a {
    color: var(--neutral600);    
    transition: color 0.4s ease;
  } */
  /* .child-categories-shop li a:hover {
    color: var(--primary500);
  } */
  /* plus */
  .plus-icon {
    position: relative;
    width: 12px;
    height: 12px;
    margin: 3px;
    /* padding: 7px; */
    cursor: pointer;
  }

  .plus-icon::before,
  .plus-icon::after {
    content: '';
    position: absolute;
    background-color: var(--neutral200);
    border-radius: 2px;
    transition: background-color 0.4s ease;
  }

  .product-categories-shop>li.open .plus-icon::after,
  .product-categories-shop>li.open .plus-icon::before,
  .product-categories-shop>li:hover .plus-icon::after,
  .product-categories-shop>li:hover .plus-icon::before {
    background-color: var(--primary500);
  }

  .plus-icon::before {
    width: 100%;
    height: 2px;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
  }

  .plus-icon::after {
    width: 2px;
    height: 100%;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
  }

  /* warehouse */
  .warehouse-status {
    display: flex;
    flex-direction: column;
    gap: 16px;
    color: var(--primary500);
  }

  .warehouse-status-container form {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  /* Custom checkbox label */
  .custom-checkbox {
    position: relative;
    padding-left: 26px;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
  }

  /* Default text color */
  .custom-checkbox .label-text {
    color: var(--neutral600);
    transition: color 0.4s ease;
  }

  /* Hide default checkbox */
  .custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
  }

  /* Custom box */
  .custom-checkbox .checkmark {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 18px;
    width: 18px;
    background-color: var(--black_white50);
    border: 2px solid var(--neutral200);
    border-radius: 2px;
    transition: all 0.4s ease;
  }

  /* When checked */
  .custom-checkbox input:checked~.checkmark {
    background-color: var(--primary500);
    border-color: var(--primary500);
  }

  /* Checkmark (tick) */
  .custom-checkbox .checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 4px;
    top: 0px;
    width: 6px;
    height: 10px;
    border: solid var(--black_white50);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
  }

  /* Show tick when checked */
  .custom-checkbox input:checked~.checkmark:after {
    display: block;
  }

  /* Hover effect */
  .custom-checkbox:hover .checkmark {
    border-color: var(--primary500);
  }

  /* Change color when checked */
  .custom-checkbox input:checked~.label-text {
    color: var(--primary500);
  }

  /* Keep your hover rule if you want both hover + checked effects */
  .custom-checkbox:hover .label-text {
    color: var(--primary500);
  }

  .close-wrapper {
    display: none;
  }
}

/* right side */
.shop-r {
  display: flex;
  flex-direction: column;
  gap: 32px;
  width: 100%;
  transition: gap 0.4s ease;
}

.shop-r {
  .shop-product-not-found>div {
    padding: 0;
    margin: 0;
    background-color: transparent;
    color: var(--black_white950);
    border-top: unset;
  }

  /* Remove default before and after */
  .shop-product-not-found>div::before,
  .shop-product-not-found>div::after {
    display: none;
    content: none;
  }

  .custom-dropdown {
    /* container */
    position: relative;
    color: var(--black_white950);
  }

  .custom-dropdown .dropdown-toggle {
    background: none;
    border: 1px solid var(--neutral200);
    color: var(--black_white950);
    border-radius: 8px;
    padding: 10px 16px;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: border-color 0.4s ease;
  }

  .custom-dropdown .dropdown-toggle svg {
    height: 20px;
    width: 20px;
  }

  .custom-dropdown .dropdown-toggle>span {
    transform: rotate(0deg);
    transition: transform 0.4s ease;
  }

  .custom-dropdown .dropdown-toggle.active>span {
    transform: rotate(180deg);
  }

  .custom-dropdown .dropdown-toggle:hover,
  .custom-dropdown .dropdown-toggle:focus {
    border-color: var(--primary500);
    cursor: pointer;
  }

  .custom-dropdown .sort-by-dropdown-menu {
    position: absolute;
    opacity: 0;
    margin-top: 4px;
    right: 0;
    transform: translateY(-5px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.4s ease;
  }

  .custom-dropdown .sort-by-dropdown-menu.open {
    opacity: 1;
    transform: translateY(0);
    border: 1px solid var(--primary500);
    border-radius: 8px;
    overflow: hidden;
    background: var(--black_white50);
    pointer-events: auto;
    z-index: 10;
  }

  .custom-dropdown .sort-by-dropdown-menu li {
    min-width: -webkit-max-content;
    min-width: -moz-max-content;
    min-width: max-content;
    width: 100%;
    padding: 8px 12px;
    transition: color 0.4s ease, background-color 0.4s ease;
  }

  .custom-dropdown .sort-by-dropdown-menu li.active {
    background: var(--black_white100);
    color: var(--primary500);
  }

  .custom-dropdown .sort-by-dropdown-menu li:hover {
    cursor: pointer;
    color: var(--primary500);
    background: var(--black_white100);
  }
}

.shop-r-upper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
}

/* Responsive */
@media (max-width: 1300px) {
  .all-products-wrapper {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1100px) {
  .all-products-wrapper {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .all-products-wrapper {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1100px) {

  /* main content */
  .shop-main {
    padding: 24px 16px 50px;
    flex-direction: column;
    gap: 24px;
  }

  /* right side */
  .shop-r {
    gap: 24px;
  }

  .shop-r-upper {
    display: none;
  }

  /* left side */
  .shop-l {
    display: none;
    gap: 24px;
  }

  .shop-l {
    .extra-categories-desktop {
      max-width: unset;
      margin-bottom: 24px;
    }

    .close-wrapper {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 20px 16px;
      flex-shrink: 0;
      color: var(--black_white950);
      background: var(--black_white100);
      transition: color 0.4s ease;
    }

    .close-wrapper svg {
      height: 16px;
      width: 16px;
      transform: rotate(180deg);
    }

    .close-wrapper:hover {
      color: var(--primary500);
      cursor: pointer;
    }

    .categories-title {
      margin-bottom: 0;
    }

    .warehouse-status-container form {
      gap: 16px;
      padding: 24px 16px;
    }

    .product-categories-shop {
      flex: 1;
      min-height: 0;
      gap: 16px;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      padding: 24px 0;
    }

    .product-categories-shop>li {
      flex-direction: row-reverse;
      padding: 0 16px;
      row-gap: 8px;
      column-gap: 24px;
    }

    .plus-icon {
      padding: 7px;
      height: 16px;
      width: 16px;
    }

    .plus-icon-wrapper {
      width: 45px;
      height: 22px;
      display: flex;
      justify-content: end;
      cursor: pointer;
    }

    .product-categories-shop>li:not(:has(.plus-icon)) {
      margin-left: unset;
    }
  }

  .shop-categories-wrapper {
    .shop-filter-toggle {
      display: flex;
    }

    .mobile-title-wrapper {
      display: flex;
      align-items: center;
      gap: 24px;
      justify-content: space-between;
    }

    .products-archive-title {
      word-break: break-all;
    }

    .sortby-filter {
      display: flex;
      color: var(--primary500);
    }

    .sort-by-dropdown-menu {
      display: flex;
      flex-direction: column;
      gap: 16px;
      padding: 24px 16px;
    }

    .sort-by-dropdown-menu li {
      color: var(--neutral600);
      cursor: pointer;
      transition: color 0.4s ease;
    }

    .sort-by-dropdown-menu li:hover,
    .sort-by-dropdown-menu li.active {
      color: var(--primary500);
    }
  }

  .shop-categories-wrapper.active {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--black_white50);
    z-index: 1000;
    -webkit-animation: slideIn 0.4s ease forwards;
    animation: slideIn 0.4s ease forwards;
  }

  .shop-categories-wrapper.active {
    .shop-l {
      display: flex;
      padding: 20px 16px 32px;
      position: relative;
      height: 100%;
    }

    .mobile-filter-title {
      display: flex;
      justify-content: space-between;
      padding: 30px 16px 24px;
      border-bottom: 1px solid var(--neutral200);
      flex-shrink: 0;
    }

    .shop-filter-toggle {
      display: none;
    }

    .mobile-title-wrapper {
      display: none;
    }
  }

  .mobile-container {
    display: none;
    /* hidden by default */
  }

  .mobile-container.visible {
    display: flex;
    flex-direction: column;
    position: absolute;
    inset: 0;
    height: calc(100dvh - 85px);
    background: var(--black_white50);
    overflow: hidden;
  }

  .mobile-title {
    cursor: pointer;
  }

  .price-slider {
    border-top: unset;
    border-bottom: unset;
    padding: 0;
  }

  .price-slider {
    .wrapper {
      padding: 0 16px;
    }

    .container {
      height: 56px;
    }

    .primary-btn-large {
      margin: 0 16px;
    }
  }
}

@media (max-width: 600px) {
  .all-products-wrapper {
    grid-template-columns: repeat(1, 1fr);
  }
}

@-webkit-keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}