.filter-title {
  display: flex;
  justify-content: space-between;
  margin-bottom: 24px;
  align-items: center;
}

.filter-title h2 {
  font-size: 20px;
  line-height: 24px;
  color: #0a0a0a;
  font-weight: 700;
}

.filter-wrapper {
  background: #f9fbff;
  padding: 20px;
  border-radius: 12px;
}

.filter-section {
  margin-bottom: 25px;
}

.filter-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-weight: 600;
}

.filter-items.grid-4 {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.filter-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s;
  width: calc(25% - 9px);
}


.filter-card .thumb {
  width: 100%;
  aspect-ratio: 1;
  height: auto;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 8px;
  opacity: .6;
  border: 1px solid #DBDEF2;
  transition: all 0.4s;
}

.filter-card.active .thumb {
  opacity: 1;
  border-color: #161619;
}

.filter-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.filter-card span {
  font-size: 12px;
  line-height: 16px;
  font-style: 400;
  color: #161619;
}

#fb-colors {
  display: flex;
  gap: 10px;
  max-width: 180px;
  flex-wrap: wrap;
}

#fb-colors .color-filter-item {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  margin-bottom: 0;
  position: relative;
  transition: all 0.4s;
  border: 2px solid #898999;
}

#fb-colors .color-filter-item.active {
  border-color: #0a0a0a;
}


#fb-colors .color-filter-item span {
  display: block;
  font-size: 11px;
  text-align: center;
  margin-top: 4px;
}

/* price range slider */
.filter-section .noUi-horizontal .noUi-handle {
  width: 30px;
  height: 30px;
  border-radius: 100%;
  right: -2px;
  top: -8px;
}

.filter-section .noUi-horizontal .noUi-handle.noUi-handle-lower {
  right: -28px;
}

.filter-section .noUi-horizontal .noUi-handle::after,
.filter-section .noUi-horizontal .noUi-handle::before {
  display: none;
}

.filter-section .noUi-target {
  border-radius: 30px;
  height: 14px;
  width: 100%;
  margin: 18px auto 0;
}

.filter-section .noUi-connect {
  background-color: #dc9832;
}

.filter-section #price-value {
  margin-top: 12px;
}

.filter-price {
  padding-left: 0;
  list-style: none;
}

.filter-price label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-price label input {
  accent-color: #b7802d;
  margin: 0;
  width: 16px;
  height: 16px;
  margin-bottom: 2px;
}

/* button apply filter */
#apply-filter {
  border-radius: 12px;
  background-color: #dc9832;
  border: 1px solid #dc9832;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 18px;
  line-height: 22px;
  font-weight: 500;
  width: 100%;
  margin: 24px 0;
  font-family: "Roboto", sans-serif !important;
  transition: all 0.4s;
  text-transform: unset;
}

#apply-filter:hover {
  background-color: white;
  color: #dc9832;
}

#overlay {
  width: 100vw;
  height: 100vh;
  background-color: rgba(10, 10, 10, 0.8);
  position: fixed;
  top: 0;
  left: 0;
  z-index: -100;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s;
}

#overlay.is-show {
  opacity: 1;
  visibility: visible;
  z-index: 9999;
}

.close-filter {
  width: 24px;
  height: 24px;
  background-image: url(./images/ic-close.svg);
  background-repeat: no-repeat;
  background-size: contain;
  opacity: .6;
  display: none;
  transition: all 0.4s;
  position: absolute;
  top: 30px;
  right: 16px;
}

.close-filter:hover {
  opacity: 1;
}

#icon-filter {
  position: fixed;
  top: 20%;
  left: 2px;
  background-color: white;
  border: 1px solid #0a0a0a;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
  background-image: url(./images/icon-filter.svg);
  background-repeat: no-repeat;
  background-size: 24px;
  width: 36px;
  height: 36px;
  background-position: center;
  padding: 6px;
  border-radius: 4px;
  z-index: 1000;
  cursor: pointer;
  opacity: .5;
  transition: all 0.4s;
  display: none;
}

#icon-filter:hover {
  opacity: 1;
}

.overflow-hidden {
  overflow: hidden;
}

/* Thanh filter ngang */
.filter-bar {
  border-radius: 24px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff;
}

/* Nhãn "Bộ lọc" + icon */
.filter-bar__label {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-right: 8px;
}

.filter-bar__icon {
  width: 24px;
  height: 24px;
  background: url('./images/icon-filter.svg') center/20px 20px no-repeat;

}

/* Cụm controls */
.filter-bar__controls {
  display: flex;
  gap: 14px;
  align-items: center;
  flex: 1;
}

.filter-select {
  background: #fff;
  border: 1px solid #DBDEF2;
  border-radius: 12px;
  padding: 8px 16px;
  flex: 1;
}

.filter-select__caption {
  display: block;
  font-size: 10px;
  line-height: 100%;
  color: #898999;
}

.filter-select select {
  width: 100%;
  border: none;
  outline: none;
  font-weight: 600;
  color: #161619;
  background-color: transparent !important;
  box-shadow: none !important;
  appearance: none;
  margin-bottom: 0;
  padding: 0;
  background: url(./images/ic-select.svg) right / 16px 12px no-repeat;
}

/* Màu sắc dạng chấm tròn */
.filter-colors-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.filter-wrapper .filter-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.filter-wrapper .filter-colors .color-filter-item {
  width: calc(25% - 9px);
  height: max-content;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-wrapper .filter-colors .color-filter-item .box-color {
  aspect-ratio: 1;
  height: auto;
  width: 100%;
  border-radius: 16px;
  border: 1px solid #DBDEF2;
  cursor: pointer;
  opacity: .6;
  transition: all 0.4s;
}

.filter-wrapper .filter-colors .color-filter-item.active .box-color {
  opacity: 1;
  border-color: #161619;
}

.filter-wrapper .filter-colors .color-filter-item span {
  font-size: 12px;
  line-height: 16px;
  color: #161619;
  font-weight: 400;
  text-align: center;
}

/* Nút áp dụng */
.filter-bar .button.primary {
  margin-left: auto;
  background: #161619;
  border: 1px solid #161619;
  color: #fff;
  width: max-content;
  padding: 0 12px;
  height: 48px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 22px;
  font-weight: 500;
  font-size: 14px;
  line-height: 18px;
  text-transform: unset !important;
  transition: all 0.4s;
}

.filter-bar .button.primary:hover {
  color: #161619;
  background-color: #fff;
}

/* ==== Product list compact ==== */
.plist-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  color: #161619;
  font-size: 14px;
}

.plist-head .plist-count {
  font-size: 14px;
  line-height: 18px;
  font-weight: 600;
  color: #161619;
}

.plist-head .plist-sort {
  display: flex;
  gap: 6px;
  align-items: center;
  width: max-content;
}

.plist-head .plist-sort span {
  display: block;
  min-width: max-content;
  font-size: 14px;
  line-height: 18px;
  font-weight: 600;
  color: #161619;
}

.plist-head .plist-sort select {
  background-color: transparent;
  box-shadow: none !important;
  border: 0;
  margin-bottom: 0;
  font-size: 14px;
  line-height: 18px;
  font-weight: 600;
  color: #161619;
}

.plist {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.plist-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 24px;
  background-color: white;
}

.plist-item:last-child {
  border-bottom: 0;
}

.plist-thumb {
  width: 120px;
  height: 80px;
  border-radius: 10px;
  overflow: hidden;
  flex: 0 0 120px;
}

.plist-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.plist-main {
  flex: 1;
  min-width: 0;
}

.plist-title {
  margin: 0 0 4px;
}

.plist-title a {
  color: #161619;
  text-decoration: none;
  font-size: 24px;
  line-height: 30px;
  font-weight: 600;
  letter-spacing: 1.5px;
}

.plist-desc {
  color: #898999;
  font-size: 14px;
  line-height: 18px;
}

.plist-side {
  display: flex;
  align-items: center;
  gap: 10px;
}

.plist-price {
  background: #E2E5EC;
  padding: 12px;
  border-radius: 22px;
  font-size: 14px;
  line-height: 18px;
  font-weight: 500;
  color: #161619;
  white-space: nowrap;
}

.plist-btn {
  background: #161619;
  color: #fff;
  padding: 0 24px;
  border-radius: 22px;
  font-size: 14px;
  line-height: 18px;
  text-decoration: none;
  height: 42px !important;
  display: flex;
  align-items: center;
  font-weight: 500;
}

.plist-btn.disabled {
  opacity: .5;
  pointer-events: none;
}

.plist-more-wrap {
  text-align: center;
  margin-top: 12px;
}

.plist-more {
  display: inline-block;
  background: #161619;
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
}

/* Responsive */
@media (max-width: 991px) {
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .filter-bar__label {
    border-right: 0;
    padding-right: 0;
  }

  .filter-bar__controls {
    flex-wrap: wrap;
  }

  .filter-select {
    flex: 1;
    min-width: calc(50% - 8px);
  }

  .filter-bar .button.primary {
    width: 50%;
    margin: 0 auto;
  }

  #icon-filter {
    display: block;
  }

  .close-filter {
    display: block;
  }

  .filter-wrapper {
    max-width: 330px;
    height: 100vh;
    padding-top: 60px;
    overflow-y: scroll;
    position: fixed;
    top: 0;
    left: 0;
    background-color: white;
    z-index: 10000;
    width: 100%;
    transform: translateX(-100%);
    opacity: 0;
    transition: all 0.4s;
    border-radius: 0;
  }

  .filter-wrapper.is-open {
    opacity: 1;
    transform: translateX(0);
  }

  .filter-card {
    width: calc(100% / 3 - 8px);
  }
}

/* Responsive */
@media (max-width: 767px) {
  .plist-item {
    flex-wrap: wrap;
  }

  .plist-side {
    width: 100%;
    justify-content: space-between;
  }

  .filter-bar {
    padding: 0;
  }

  .filter-bar .button.primary {
    width: 100%;
  }

  .plist-head .plist-count,
  .plist-head .plist-sort span,
  .plist-head .plist-sort select {
    font-size: 12px;
    line-height: 18px;
  }
}