.active_filters {
  border: 1px solid #dfdfdf;
  padding: 15px;
  margin-bottom: 2vw;
  gap: 1.5vw;

  .active-filter-title {
    color: #313537;
  }
  ul {
    .filter-block {
      font-size: 0.9rem;
      line-height: 1.25em;
      padding: 8px 0;
      gap: 6px;

      svg {
        width: 14px;
        height: 14px;
      }
      strong {
        color: #313537;
      }
    }
  }
}

.search_filters {
  gap: 3.6vw;
  .facet {
    display: flex;
    flex-direction: column;
    gap: 1.5vw;
    font-size: 15px;
    ul {
      max-height: 350px;
      flex-direction: column;
      gap: 1vw;
      display: flex;
      overflow: auto;

      &.collapse:not(.in) {
        display: none;
      }
    }

    li {
      border: none;
      padding: 0;
    }

    .title {
      width: 30px;
      text-align: center;
      flex-grow: 0;
    }

    .facet-title {
      color: #313537;
    }

    .navbar-toggler {
      padding: 0;
      width: 100%;
      cursor: pointer;
    }

    &.facet-type-price .in {
      overflow: initial;
    }
    .faceted-slider {
      .in {
        overflow-y: auto;
        overflow-x: hidden;
      }
      p {
        font-size: 1.125rem;
        font-weight: 700;
        margin-top: 0;
      }
    }
    .facet-label span {
      cursor: pointer;
    }
    ul:not(.pk-color) {
      input:not(:checked) + i {
        display: none !important;
      }
      .facet-label {
        display: flex;
        align-items: center;
        line-height: 20px;
        gap: 8px;
        & > span {
          margin: 0;
        }
        i {
          position: absolute;
          top: 50%;
          left: 50%;
          width: 50%;
          height: 50%;
          border-radius: 50%;
          transform: translate(-50%, -50%);
          background-color: #313537;
        }
        svg {
          display: none;
        }
      }
    }
    .pk-color {
      flex-wrap: wrap;
      flex-direction: row;
      justify-content: flex-start;
      & > li {
        width: 40px;
        aspect-ratio: 1;
        background-size: contain;
        position: relative;

        * {
          height: 100%;
          width: 100%;
          display: flex;
          padding: 0;
          margin: 0;
          border: none;
        }

        .facet-label {
          border-radius: 50%;
          font-size: 0.938rem;

          .custom-checkbox {
            height: 100%;
            width: 100%;
          }

          input:not(:checked) + i svg {
            display: none;
          }

          .color {
            cursor: pointer;
            background-size: contain;
            position: absolute;
            width: 100%;
            height: 100%;
            border-radius: 50%;

            svg {
              color: #000;
              position: absolute;
              z-index: 9;
              width: 60% !important;
              height: 60% !important;
              top: 50%;
              left: 50%;
              padding: 3px;
              border-radius: 50%;
              background: rgb(255 255 255 / 80%);
              transform: translate(-50%, -50%);
            }
          }
        }
      }

      .color-tooltip {
        top: 0;
        left: 0;
        opacity: 1;
        position: absolute;
        border-radius: 50%;
        background-size: cover;
      }
      .color-tooltip[style="background-color:#ffffff"],
      .color[style="background-color:#ffffff"] {
        border: 1px solid #ccc;
      }
      .search-link {
        display: none;
      }
    }
    .pk-checkbox .facet-label {
      .custom-checkbox {
        width: 20px;
        height: 20px;
        border: 1px solid #ccc;
        i {
          border-radius: 0;
        }
      }
    }

    .magnitude {
      color: #c1c1c1;
      font-size: 0.75em;
      vertical-align: middle;
    }
  }

  .facet-dropdown {
    > a {
      display: block;
      text-indent: 20px;
      border: 1px solid #ccc;
      padding: 5px 0;
    }

    .dropdown-menu {
      padding: 0;
      max-height: 300px;
      overflow: auto;
      a {
        transition: all 0.3 ease-in-out;
      }
      a:hover {
        background-color: #f1f1f1;
      }
    }

    .dropdown-menu .select-list {
      padding: 10px 20px;
      :hover {
        background: #eee;
      }
    }
  }

  .ui-slider {
    border: none;
    background: #eee;
    border-radius: 0;
    height: 4px;
    margin: 0 5px 18px;
    position: relative;

    .ui-slider-handle {
      display: block;
      position: absolute;
      border-radius: 0;
      top: 0;
      width: 10px;
      height: 17px;
      border: none;
      margin: 0;
      cursor: pointer;
      background: #444;
      transform: translate(-50%, 4px);
      clip-path: polygon(50% 0%, 100% 38%, 100% 100%, 0 100%, 0% 38%);
    }
    .ui-slider-range {
      border-radius: 0;
      border: none;
      position: absolute;
      top: 0;
      height: 100%;
      cursor: pointer;
      background: #444;
    }
  }
}

.product-list-container {
  margin-bottom: 2vw;

  .elementor.col-xl-4 {
    width: 100%;
  }
}

body:has(.pk-sidebar-open) {
  overflow: hidden;

  #header,
  .content-wrapper,
  .top-content {
    filter: blur(2px);
  }
}

.content-wrapper {
  transition: all 0.5s ease-out;
}

.sidebar-toggler {
  display: none;
}

#main-content::after {
  opacity: 0;
  background: #000;
  transition: all 0.5s ease-out;
}

#main-content:has(.pk-sidebar-open) {
  overflow: hidden;
  height: 100%;
  max-height: 100%;

  &::after {
    opacity: 0.6;
    content: "";
    width: 100%;
    height: 100%;
    display: block;
    position: absolute;
    z-index: 1;
    top: 0;
    pointer-events: none;
  }
}

.product_list_top {
  margin-bottom: 2.6vw;
}

.listing_view {
  gap: 10px;

  .svgic {
    width: 22px;
    color: #999;
  }

  & > div {
    width: 34px;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    cursor: pointer;

    &:focus {
      outline: none;
    }

    &.active,
    &:hover {
      border-color: #444;
    }

    &.active .svgic,
    &:hover .svgic {
      color: #444;
    }
  }
}

.view_grid1 [data-gridcols="1"],
.view_grid2 [data-gridcols="2"],
.view_grid3 [data-gridcols="3"],
.view_grid4 [data-gridcols="4"],
.view_grid5 [data-gridcols="5"],
.view_grid6 [data-gridcols="6"],
.view_list [data-gridcols="0"] {
  border-color: #444;
}

.brands-list {
  ul {
    list-style: none;
    flex-wrap: wrap;

    li {
      width: 250px;
      text-align: center;
      margin-bottom: 30px;
    }
  }

  h3 {
    margin: 0;
  }

  .brand-products a {
    color: #bbb;
    font-size: 13px;

    &:nth-child(2) {
      display: none;
    }
  }
}

@media (width >= 1600px) {
  .products-selection {
    gap: 60px;
  }
}

@media (width <= 800px) {
  .pksidebar {
    position: fixed;
    top: 0;
    right: 0;
    transform: translateX(100%);
    background: #fff;
    padding: 50px 25px 25px;
    box-sizing: border-box;
    z-index: 100;
    width: 100%;
    max-width: 400px;
    max-height: 100%;

    &:has(.pk-sidebar-open) {
      transform: translateX(0);
      overflow: auto;
      height: 100%;

      .sidebar-toggler {
        top: 0;
        right: 0;
        left: auto;
        border-color: transparent;
        transform: translateY(0%);
      }
    }

    .sidebar-toggler {
      position: absolute;
      top: 50%;
      left: -49px;
      width: 50px;
      height: 50px;
      background: #fff;
      transform: translateY(-50%);
      border: 1px solid #333;
      z-index: 9;
      cursor: pointer;
      opacity: 0.5;
      display: flex;
      justify-content: center;
      align-items: center;

      &:hover {
        opacity: 1;
      }
    }
  }

  div.products-selection {
    flex-direction: row;
    gap: 15px;

    .col-md-6 {
      width: 100%;
      margin: 0;
      padding: 0;
    }

    .pk-filter-button {
      order: 0;
    }

    .bt_compare {
      order: 1;
    }

    .sort-by-row {
      order: 2;
    }

    > .products-sort-order {
      order: 3;
    }

    > .sort-by-row,
    > .products-sort-order,
    > .sort-by-row > .products-sort-order,
    .products-sort-order .dropdown-menu {
      width: 100%;
    }

    .select-title {
      max-width: 100%;
      width: 100% !important;
    }
  }

  body .view_list .product-thumbnail {
    min-width: 180px;
  }

  body #main-content .view_list .product-miniature {
    margin-bottom: 30px;
  }

  #main-content #products.view_grid .product_list .grid-container {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)) !important;
  }
}

.pagination {
  .pagination-info {
    line-height: 2.5rem;
    font-size: 14px;
  }

  .page-list {
    gap: 5px;

    li {
      &.current a {
        color: #585858;
        border: 2px solid #585858;
      }
    }

    a,
    .spacer {
      display: flex;
      line-height: 34px;
      width: 34px;
      height: 34px;
      border: 1px solid #dfdfdf;
      text-align: center;
      justify-content: center;
      align-items: center;
      color: #585858;
      font-size: 0.75em;

      &:hover {
        border-width: 2px;
      }
    }

    svg {
      width: 8px;
    }
  }
}

.perpage-selector {
  max-width: 150px;
}

.products-selection {
  gap: 30px;

  > :last-child {
    margin-left: auto;
  }

  &.dropdown::after {
    pointer-events: none;
    top: 0;
  }

  .title {
    color: #878787;
  }

  .filter-button .btn-secondary,
  .filter-button .btn-tertiary {
    padding: 0.75rem 0.5rem 0.6875rem;
  }

  .bt_compare {
    order: 9;
    margin-right: 0;

    span {
      line-height: 1.2em;
    }
  }

  .sort-by {
    margin-right: 10px;
    display: none;
  }
}

.products-sort-order {
  color: #878787;

  .select-title {
    width: 100%;
    color: rgb(65, 65, 65);
    background: rgb(255, 255, 255);
    padding: 4px 44px 4px 15px;
    font-size: 0.875rem;
    line-height: 1.5rem;
    border: 1px solid #e0e0e0;
    min-height: 32px;
    border-radius: 6px;
  }

  .select-list {
    color: #414141;
    padding: 0.625rem 1.25rem;

    &:hover {
      background: #313537;
      color: #fff;
    }
  }

  .dropdown-menu {
    left: auto;
    width: 16.875rem;
    background: #f6f6f6;
    border: none;
    margin: 0;
    padding: 0;
    box-shadow: 1px 5px 5px rgb(0 0 0 / 13%);
  }
}

.view_list .grid-container > article,
.view_grid .grid-container > article {
  width: 100%;
  margin-right: 0;
}

.view_grid .grid-container {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  column-gap: 40px;
  grid-auto-flow: dense;
}

.product-grid-2 .view_grid .product_list .grid-container {
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
}

.product-grid-3 .view_grid .product_list .grid-container {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.product-grid-4 .view_grid .product_list .grid-container {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.product-grid-5 .view_grid .product_list .grid-container {
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}

.product-grid-6 .view_grid .product_list .grid-container {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

#main-content
  #products.view_grid2
  .product_list
  #js-product-list
  .grid-container {
  grid-template-columns: repeat(2, minmax(100px, 1fr)) !important;
}

#main-content
  #products.view_grid3
  .product_list
  #js-product-list
  .grid-container {
  grid-template-columns: repeat(3, minmax(100px, 1fr)) !important;
}

#main-content
  #products.view_grid4
  .product_list
  #js-product-list
  .grid-container {
  grid-template-columns: repeat(4, minmax(100px, 1fr));
}

#main-content
  #products.view_grid5
  .product_list
  #js-product-list
  .grid-container {
  grid-template-columns: repeat(5, minmax(100px, 1fr)) !important;
}

#main-content
  #products.view_grid6
  .product_list
  #js-product-list
  .grid-container {
  grid-template-columns: repeat(6, minmax(100px, 1fr)) !important;
}

#products {
  .up {
    margin-bottom: 1rem;

    .btn-secondary,
    .btn-tertiary {
      color: #acaaa6;
      text-transform: inherit;
    }
  }

  .products {
    justify-content: space-around;
  }
}

#products.view_grid .pm_desk_false {
  display: none;
}

@media (width <= 1600px) {
  #view_grid6 {
    display: none;
  }
}

@media (width <= 1300px) {
  #view_grid5 {
    display: none;
  }
}

@media (width >= 1300px) {
  #view_grid2 {
    display: none;
  }
}

@media (width <= 768px) {
  #left-column #search_filters_wrapper {
    margin-left: -15px;
    margin-right: -15px;
  }

  #main-content #left-column #search_filters_wrapper {
    margin: 0;
  }
}
