.hdt-btn-filter-price {
  padding: 5px 14px;
  min-height: 36px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  background-color: rgb(var(--color-foreground) / .06);
  color: rgb(var(--color-foreground));
  text-transform: uppercase;
  transition: color .25s ease, background-color .25s ease, border-color .25s ease, box-shadow .25s ease, opacity .25s ease;
}
@media screen and (pointer: fine) {
  .hdt-btn-filter-price:hover {
    background-color: rgb(var(--color-foreground) / .086);
  }
}

.hdt-layout-wrap{
  &:has(.hdt-sb-widget):not(:has(.hdt-search__form)){
    display: grid;
    grid-template-columns: 30rem 1fr;
    gap: 3rem;
    &:has(.hdt-sb-position-right){
      grid-template-columns: 1fr 30rem;
    }
    @media (width < 767px){
      grid-template-columns: 1fr;
      &:has(.hdt-sb-position-right){
        grid-template-columns: 1fr;
      }
    }
  }
  &:has(.hdt-search__form) .hdt-sb-widget{
    display: none;
  }
  &:has(.hdt-control-sorting) .hdt-shop-control{
    /* margin-top: -1rem; */
  }
  div:empty{
    display: none;
  }
  hdt-reval-items{
    margin-top: 3rem;
  }
  .hdt-result-count{
    @media (width < 767px){
      display: none;
    }
  }
  .hdt-control-filter{
    display: inline-block;
    padding-inline-end: 2rem;
    text-decoration: none;
    user-select: none;
    &::before,
    &::after{
      content: " ";
      width: 1rem;
      height: 0.2rem;
      position: absolute;
      right: 0;
      top: 50%;
      display: inline-block;
      background-color: rgb(var(--color-foreground));
      transition: all .2s ease-in-out;
      transform: translateY(-50%);
    }
    .dir--rtl &::before,
    .dir--rtl &::after{
      right: auto;
      left: 0;
    }
    &::before{
      transform: translateY(-50%) rotate(-90deg);
    }
    
  }
  .hdt-filter-accordion--item[open] .hdt-control-filter{
    &::before{
      transform: translateY(-50%) rotate(-45deg);
    }
    &::after{
      transform: translateY(-50%) rotate(45deg);
    }
  }
  .hdt-filter-inline {
    #hdt-facet-filters-form{
      padding: 3rem;
      margin-top: 2rem;
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 2rem;
      background-color: rgb(var(--color-background2,249 249 249));
      @media (width < 1150px){
        grid-template-columns: repeat(2, 1fr);
      }
      @media (width < 767px){
        grid-template-columns: 1fr;
      }
    }
  }
  &:has(.hdt-filter-control-input:checked) .hdt-filter-inline{
    max-height: 320rem !important;
    overflow-y: auto;
  }
  .hdt-filter-inline{
    transition: all 0.5s ease;
    opacity: 0;
    .hdt-filter-group__header{
      display: none;
    }
    .hdt-filter-group__color-wrap{
      padding-inline-end: 1rem;
      label > div{
        gap: 1rem;
      }
    }
    .hdt-filter-group__list-item:not(:last-child){
      margin-bottom: 0.5rem;
    }
    .hdt-filter-group__list{
      max-height: 18rem;
      overflow-y: auto;
    }
    .hdt-filter-group-title{
      font-weight: var(--font-bold);
      font-size: var(--text-lg);
      margin-bottom: 2.5rem;
      padding-bottom: 0.4rem;
      position: relative;
      text-transform: uppercase;
      &::after{
        content: "";
        position: absolute;
        bottom: 0;
        display: inline-block;
        width: 3rem;
        height: 0.2rem;
        background-color: rgb(var(--color-foreground)/.1);
      }
    }
    .hdt-filter-group--sizes .hdt-filter-group-title{
      margin-bottom: 1.5rem;
    }
    .hdt-filter-group__color{
      width: 2.5rem;
      height: 2.5rem;
      aspect-ratio: 1;
      border-radius: var(--radius-full);
      background-color: var(--hdt-bg-color, #e5e5e5);
      display: inline-block;
      border: solid 1px transparent;
      transition: border .25s ease;
    }
    .hdt-bg-image{
      background: var(--hdt-bg-image, none);
      background-position: var(--hdt-focal-point, center) !important;
      background-repeat: no-repeat !important;
      background-size: calc(100% + 10px) calc(100% + 10px) !important;
    }
    .hdt-filter-group--sorting{
      input{
        display: none;
      }
    }
    .hdt-filter-group__list-item:has(input:checked){
      color: rgb(var(--color-accent));
    }
    .hdt-filter-group--sizes{
      .hdt-filter-group__list-item{
        padding-top: 1rem;
        margin-bottom: 0;
      }
      .hdt-filter-group__list{
        display: flex;
        flex-wrap: wrap;
        column-gap: 1rem;
        row-gap: 0rem;
        label{
          text-transform: uppercase;
          position: relative;
          font-weight: var(--font-bold);
          font-size: var(--text-lg);
          .hdt-filter-group__color-count{
            position: relative;
            top: -1rem;
            color: rgb(var(--color-foreground2)/.4);
          }
        }
      }
    }
    .hdt-filter-group__list-item[disabled]{
      opacity: 0.5;
      pointer-events: none;
      span {
        text-decoration: line-through;
      }
    }
    label{
      transition: all .25s ease;
      &:hover{
        color: rgb(var(--color-accent));
        .hdt-filter-group__color-count{
          color: rgb(var(--color-accent)) !important;
        }
      }
    }
  }
  .hdt-filter-group--tags{
    .hdt-filter-group__list{
      display: flex;
      align-items: center;
      gap: 1rem;
      flex-wrap: wrap;
      padding-top: 1px;
    }
    .hdt-filter-group__list-item{
      margin-bottom: 0 !important;
    }
    .hdt-filter-group__color-count{
      display: none;
    }
    label{
      padding: 0.5rem 1.2rem;
      font-size: var(--text-xs);
      color: rgb(var(--hdt-btn-bg)/.6);
      /* background-color: rgb(var(--hdt-btn-bg)); */
      border: 1px solid rgb(var(--hdt-btn-border-color)/.1);
      display: block;
      line-height: 1;
    }
    input:checked + label,
    label:hover{
      color: rgb(var(--hdt-btn-color));
      background-color: rgb(var(--color-accent));
      border-color: rgb(var(--color-accent));
    }
  }
  .hdt-price-range{
    --track: rgb(var(--color-line-border));
    --thumb: rgb(var(--color-accent));
    --height-track: .2rem;
    --width-thumb: 1.6rem;
    --height-thumb: 1.6rem;
    --radius-thumb: 50%;
    .hdt-filter-group__range-progress{
      position: relative;
      height: var(--height-track);
      background: var(--track);
      border-radius: 5px;
      .hdt-progress{
        display: block;
        height: 100%;
        left: var(--min-progress, 0);
        right: var(--max-progress, 0);
        position: absolute;
        border-radius: 5px;
        background: var(--thumb);
        .dir--rtl &{
          right: var(--min-progress, 0);
          left: var(--max-progress, 0);
        }
      }
    }
    .hdt-filter-group__range-price input {
      position: absolute;
      width: 100%;
      height: var(--height-track);
      top: calc(var(--height-track) * -1);
      background: none;
      pointer-events: none;
      -webkit-appearance: none;
      -moz-appearance: none;
    }
    .hdt-filter-group__range-price input[type=range]::-webkit-slider-runnable-track {
      background: none;
    }
    .hdt-filter-group__range-price input[type=range]::-webkit-slider-thumb {
      height: var(--height-thumb);
      width: var(--width-thumb);
      border: none;
      border-radius: var(--radius-thumb);
      background: var(--thumb);
      pointer-events: auto;
      -webkit-appearance: none;
      box-shadow: 0 0 6px #0000000d;
    }
    .hdt-filter-group__range-slider{
      margin-bottom: 2rem;
    }
    .hdt-filter-group__input-price{
      gap: 1rem;
      & > div{
        border: 1px solid #eee;
        padding: 8px 10px;
        border-radius: 5px;
        gap: .625rem;
      }
      input {
        -webkit-appearance: textfield;
        appearance: textfield;
        text-align: end;
        background: none;
        border: none;
        width: 100%;
        min-width: 0;
        margin: 0;
        padding: 0;
        &::-webkit-inner-spin-button {
          -webkit-appearance: none;
          appearance: none;
          margin: 0;
        }
      }
    }
  }
  .hdt-filter-group__input-price-wrap{
    flex-wrap: wrap;
    gap: 1rem;
  }
  .hdt-sb-inner .hdt-filter-inline .hdt-filter-group__list {
    max-height: 40rem;
  }
}

.hdt-no-result-product{
  display: flex;
  gap: 1rem;
  align-items: center;
  border: 1px solid rgb(var(--color-error-text));
  color: rgb(var(--color-error-text));
  padding: 1rem 2rem;
  text-align: start;
  margin-top: 2rem;
  svg{
    fill: currentColor;
  }
}
.hdt-search-empty .hdt-no-result-product{
  margin-top: 0;
}