.wcdf-filters {
  background: #fff;
  padding: 15px;
  border-radius: 5px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.wcdf-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.wcdf-reset {
  background: none;
  border: none;
  color: #2271b1;
  cursor: pointer;
  padding: 0;
}

.wcdf-section {
  margin-bottom: 15px;
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 15px;
}

.wcdf-section:last-child {
  border-bottom: none;
}

.wcdf-section-title {
  cursor: pointer;
  padding: 5px 0;
  position: relative;
}

.wcdf-section-title:after {
  content: "+";
  position: absolute;
  right: 0;
  top: 5px;
  font-weight: bold;
}

.wcdf-section-title.active:after {
  content: "-";
}

.wcdf-section-content {
  display: none;
  padding: 5px 0;
}

.wcdf-section-title.active + .wcdf-section-content {
  display: block;
}

.wcdf-cat-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.wcdf-cat-list ul {
  list-style: none;
  padding-left: 15px;
  margin-left: 10px;
  border-left: 1px dashed #ddd;
  display: none;
}

.wcdf-cat-item.has-children.open > ul {
  display: block;
}

.wcdf-cat-toggle {
  cursor: pointer;
  display: inline-block;
  width: 20px;
  text-align: center;
}

.wcdf-attr-group {
  margin-bottom: 15px;
}

.wcdf-attr-terms {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.wcdf-attr-terms label {
  display: flex;
  align-items: center;
  cursor: pointer;
  gap: 5px;
}

#wcdf-products-container {
  width: 100%;
  position: relative;
  min-height: 100px;
}

.wcdf-loading {
  opacity: 0.7;
}

.wcdf-loading:after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  border: 3px solid rgba(0, 0, 0, 0.1);
  border-top-color: #2271b1;
  border-radius: 50%;
  animation: wcdf-spin 1s linear infinite;
  transform: translate(-50%, -50%);
}

@keyframes wcdf-spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}
/* Стили для категорий */
.wcdf-cat-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.wcdf-cat-item {
  position: relative;
  padding: 8px 15px;
  margin-bottom: 5px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.wcdf-cat-item.has-children {
  cursor: pointer;
  padding-left: 30px;
}

.wcdf-cat-item.current-cat {
  background-color: #2271b1;
  color: white;
}

.wcdf-cat-item.current-cat .wcdf-cat-name,
.wcdf-cat-item.current-cat .wcdf-cat-count {
  color: white;
}

.wcdf-cat-toggle {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  text-align: center;
  line-height: 16px;
  font-size: 16px;
}

.wcdf-cat-name {
  display: inline-block;
  vertical-align: middle;
  color: inherit;
}

.wcdf-cat-count {
  font-size: 0.9em;
  color: #777;
  margin-left: 5px;
}

.wcdf-cat-item.current-cat .wcdf-cat-count {
  color: rgba(255, 255, 255, 0.7);
}

.wcdf-subcat-list {
  display: none;
  padding-left: 20px;
  margin-top: 5px;
  list-style: none;
}

.wcdf-cat-item.open > .wcdf-subcat-list {
  display: block;
}

/* Стили для выбранной категории */
.wcdf-cat-item.current-cat {
  background-color: #2271b1;
  color: white;
}

.wcdf-cat-item.current-cat .wcdf-cat-name,
.wcdf-cat-item.current-cat .wcdf-cat-count,
.wcdf-cat-item.current-cat .wcdf-cat-toggle {
  color: white;
}

/* Ховер-эффекты */
.wcdf-cat-item:not(.current-cat):hover {
  background-color: #f5f5f5;
}

.wcdf-cat-item.current-cat:hover {
  background-color: #1a5a8a;
}
/* Дополнительные стили для предотвращения нежелательных кликов */
.wcdf-cat-item label {
  cursor: pointer;
  display: inline;
}

.wcdf-cat-item input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.wcdf-cat-item.has-children input[type="radio"] {
  display: none;
}

.wcdf-cat-item:not(.has-children) label {
  display: block;
  width: 100%;
}
.wcdf-cat-item {
  position: relative;
  padding: 10px 15px;
  margin-bottom: 5px;
  border-radius: 4px;
  transition: all 0.2s;
}

.wcdf-cat-item.has-children {
  cursor: pointer;
  padding-left: 35px;
  background-color: #f8f8f8;
}

.wcdf-cat-item.current-cat {
  background-color: #2271b1;
  color: white;
}

.wcdf-cat-toggle {
  position: absolute;
  left: 10px;
  top: 10px;
  width: 20px;
  height: 20px;
  text-align: center;
  line-height: 20px;
  font-size: 18px;
  font-weight: bold;
  color: #555;
}

.wcdf-cat-item.current-cat .wcdf-cat-toggle {
  color: white;
}

.wcdf-subcat-list {
  display: none;
  padding-left: 15px;
  margin-top: 10px;
  list-style: none;
}

.wcdf-cat-item.open > .wcdf-subcat-list {
  display: block;
}

.wcdf-cat-item label {
  display: block;
  cursor: pointer;
  margin: -10px -15px;
  padding: 10px 15px;
}

.wcdf-cat-item.has-children label {
  display: inline;
  cursor: default;
}

.wcdf-cat-item input[type="radio"] {
  position: absolute;
  opacity: 0;
}

.wcdf-cat-name {
  margin-left: 5px;
}

.wcdf-cat-count {
  font-size: 0.9em;
  color: #777;
  margin-left: 5px;
}

.wcdf-cat-item.current-cat .wcdf-cat-count {
  color: rgba(255, 255, 255, 0.7);
}
