/** Shop Sidebar Widgets */

.shop-sidebar-widget {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg) var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
}

.shop-sidebar-widget .widget-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  padding: var(--spacing-sm) 0;
}

.shop-sidebar-widget .widget-title {
  color: var(--color-text);
  margin: 0;
}

.shop-sidebar-widget .widget-toggle-btn,
.shop-sidebar-widget .subcat-toggle-btn {
  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  padding: 0 var(--spacing-xs) !important;
  margin: 0 !important;
  color: var(--color-text-muted) !important;
  cursor: pointer;
  line-height: 1;
  font-weight: 400;
  transition: color 0.2s ease;
}

.shop-sidebar-widget .widget-toggle-btn:hover,
.shop-sidebar-widget .widget-toggle-btn:focus,
.shop-sidebar-widget .widget-toggle-btn:active,
.shop-sidebar-widget .subcat-toggle-btn:hover,
.shop-sidebar-widget .subcat-toggle-btn:focus,
.shop-sidebar-widget .subcat-toggle-btn:active {
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  color: var(--color-accent) !important;
}

.shop-sidebar-widget .widget-content {
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--color-border);
  margin-top: var(--spacing-sm);
}

/* Section: Category tree. */
.custom-category-tree,
.subcat-tree {
  list-style: none;
  padding: 0;
  margin: 0;
}

.subcat-tree {
  padding-left: var(--spacing-lg);
  margin-top: var(--spacing-sm);
  padding-top: 6px;
}

.custom-category-tree .cat-item {
  margin-bottom: 0;
  padding: 10px 0;
  border-bottom: 1px dotted var(--color-border);
}

.custom-category-tree .cat-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.subcat-tree .cat-item {
  padding: 6px 0;
  border-bottom: 1px dotted rgba(0, 0, 0, 0.08);
}

.cat-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  line-height: 1.5;
}

.cat-link {
  color: var(--color-text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
}

.cat-link:hover {
  color: var(--color-accent);
}

.cat-link .count {
  color: var(--color-text-muted);
}

/* Section: Skin filter. */
.skin-type-filter-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.skin-type-item {
  padding: 10px 0;
  border-bottom: 1px dotted var(--color-border);
}

.skin-type-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.custom-checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  gap: var(--spacing-md);
  color: var(--color-text);
  line-height: 1.5;
}

.skin-type-checkbox {
  accent-color: var(--color-accent);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Section: Price slider. */
.dual-range-slider-container {
  position: relative;
  width: 100%;
  height: 6px;
  background-color: var(--color-border);
  border-radius: var(--radius-full);
  margin: 24px 0 20px 0;
}

.dual-range-slider-container .slider-track {
  position: absolute;
  height: 100%;
  background-color: var(--color-accent);
  border-radius: var(--radius-full);
  z-index: 1;
}

.dual-range-slider-container .range-slider {
  position: absolute;
  width: 100%;
  height: 6px;
  top: 0;
  left: 0;
  background: none !important;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  border: none !important;
  z-index: 2;
}

.range-slider::-webkit-slider-runnable-track {
  background: transparent !important;
  border: none !important;
}

.range-slider::-moz-range-track {
  background: transparent !important;
  border: none !important;
}

.range-slider::-webkit-slider-thumb {
  height: 18px;
  width: 18px;
  border-radius: 50%;
  background: var(--color-text);
  pointer-events: auto;
  -webkit-appearance: none;
  cursor: pointer;
  margin-top: -6px;
  box-shadow: none !important;
  border: none !important;
  position: relative;
  z-index: 3;
}

.range-slider::-moz-range-thumb {
  height: 18px;
  width: 18px;
  border-radius: 50%;
  background: var(--color-text);
  pointer-events: auto;
  cursor: pointer;
  border: none !important;
  box-shadow: none !important;
  position: relative;
  z-index: 3;
}

.price-label-row {
  display: flex;
  justify-content: space-between;
  color: var(--color-text-muted);
  margin-bottom: 20px;
  line-height: 1.5;
  font-weight: 500;
}

.btn-apply-price-filter {
  width: 100%;
  background: var(--color-text) !important;
  color: var(--color-white) !important;
  border: none !important;
  border-radius: var(--radius-md);
  padding: 12px var(--spacing-lg) !important;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.2;
  box-shadow: none !important;
  margin-top: 4px;
}

.btn-apply-price-filter:hover {
  background: var(--color-accent) !important;
}

/* Section: Responsive. Mobile-first base (0-639px): categories filter lives in drawer. */
.off-canvas-drawer .widget_custom_categories_filter,
.ast-off-canvas-filter .widget_custom_categories_filter,
#secondary .widget_custom_categories_filter {
  display: none !important;
}

@media (min-width: 1024px) {
  .off-canvas-drawer .widget_custom_categories_filter,
  .ast-off-canvas-filter .widget_custom_categories_filter,
  #secondary .widget_custom_categories_filter {
    display: block !important;
  }
}
