/* =============================================
   AN Customs - Amazzingfilter Custom Styles
   ============================================= */

/* --- Main filter container --- */
#amazzing_filter.block {
  background: transparent;
  border: none;
  padding: 0;
}

#amazzing_filter.block .title_block {
  display: none;
}

/* --- Each filter block: card style --- */
.af_filter {
  border: 1px solid #e0e0e0 !important;
  border-radius: 10px !important;
  margin-bottom: 18px !important;
  padding: 0 !important;
  background: #fff;
  overflow: visible !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

/* --- Filter header (subtitle) --- */
.af_filter .af_subtitle {
  background: #ff0000 !important;
  color: #fff !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px;
  padding: 10px 15px !important;
  margin: 0 !important;
  border-bottom: none !important;
  display: flex !important;
  align-items: center !important;
  cursor: pointer;
  position: relative;
  border-radius: 10px 10px 0 0 !important;
  overflow: hidden;
}

/* Filter icon before title - override the toggle-content chevron */
#amazzing_filter .af_filter .af_subtitle.toggle-content:before,
.af_subtitle.toggle-content:before {
  content: "\f0b0" !important;
  font-family: FontAwesome !important;
  font-weight: 900 !important;
  position: static !important;
  border: none !important;
  width: auto !important;
  height: auto !important;
  margin: 0 8px 0 0 !important;
  transform: none !important;
  font-size: 13px !important;
  color: #fff !important;
  flex-shrink: 0;
  top: auto !important;
  right: auto !important;
}

/* Refresh icon after title */
#amazzing_filter .af_filter .af_subtitle::after,
.af_filter .af_subtitle::after {
  content: "\f021" !important;
  font-family: FontAwesome !important;
  font-weight: 900 !important;
  font-size: 13px !important;
  color: #fff !important;
  opacity: 0.85;
  margin-left: auto !important;
  flex-shrink: 0;
}

/* Collapsed state chevron override */
#amazzing_filter .closed .af_subtitle.toggle-content:before {
  content: "\f0b0" !important;
  border: none !important;
  border-width: 0 !important;
  margin-top: 0 !important;
}

/* Remove default toggle arrow icons from the module */
.af_filter .af_subtitle .icon-plus,
.af_filter .af_subtitle .icon-minus,
.af_filter .af_subtitle i {
  display: none !important;
}

/* --- Filter content area --- */
.af_filter .af_filter_content {
  padding: 15px 18px 18px !important;
  margin: 0 !important;
}

/* --- Dropdown selects --- */
.af_filter .af-select,
.af_filter select.form-control,
.af_filter select {
  width: 100% !important;
  border: 1px solid #ccc !important;
  border-radius: 8px !important;
  padding: 9px 35px 9px 14px !important;
  font-size: 13px !important;
  color: #555 !important;
  background-color: #fafafa !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23555' d='M6 8L1 3h10z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 12px !important;
  cursor: pointer;
  transition: border-color 0.2s ease;
  height: auto !important;
  line-height: 1.4 !important;
}

.af_filter .af-select:focus,
.af_filter select:focus {
  border-color: #ff0000 !important;
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(255, 0, 0, 0.15) !important;
}

.af_filter .af-select:hover,
.af_filter select:hover {
  border-color: #999 !important;
}

/* --- Checkboxes (warehouse theme hides native checkbox, uses label::after as visual box) --- */

/* Visual checkbox box (label ::after) */
#amazzing_filter .af-checkbox-label:after,
#amazzing_filter .af-radio-label:after {
  border: 2px solid #ccc !important;
  border-radius: 3px !important;
  background: #fff !important;
  box-shadow: none !important;
  width: 16px !important;
  height: 16px !important;
  left: 0 !important;
  top: 3px !important;
  transition: all 0.15s ease;
}

/* Checked state: checkmark (label ::before on .active) */
#amazzing_filter .active > .af-checkbox-label:before {
  color: #fff !important;
  z-index: 2 !important;
  left: 3px !important;
  top: 5px !important;
  font-size: 10px !important;
}

/* Checked state: red background for checkbox */
#amazzing_filter .active > .af-checkbox-label:after {
  background: #ff0000 !important;
  border-color: #ff0000 !important;
}

/* Hover state */
#amazzing_filter li:hover > .af-checkbox-label:after {
  border-color: #ff0000 !important;
}

/* --- Checkbox labels --- */
#amazzing_filter .af-checkbox-label,
#amazzing_filter .af-radio-label {
  padding-left: 24px !important;
  padding-top: 3px !important;
  padding-bottom: 3px !important;
  font-size: 13px !important;
  color: #333 !important;
  cursor: pointer;
  line-height: 1.4 !important;
  position: relative !important;
}

#amazzing_filter .af-checkbox-label .name {
  flex: 1;
}

#amazzing_filter .af-checkbox-label .count {
  color: #999;
  font-size: 12px;
  margin-left: 5px;
}

/* --- List items --- */
.af_filter li {
  padding: 2px 0 !important;
  margin: 0 !important;
  border-bottom: none !important;
}

.af_filter ul {
  padding: 0 !important;
  margin: 0 !important;
  list-style: none !important;
}

/* --- Price slider area --- */
.af_filter.has-slider .af_filter_content {
  padding: 15px 18px 20px !important;
}

.af_filter .af-slider .selected-bar {
  background: #ff0000 !important;
}

.af_filter .af-slider .pointer {
  background: #ff0000 !important;
  border-color: #cc0000 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
}

.af_filter .af-slider .back-bar {
  background: #e8e8e8 !important;
  border-radius: 4px !important;
}

.af_filter .slider_value {
  font-weight: 600;
  color: #333;
}

/* --- Selected filters (active filters bar) --- */
#amazzing_filter .selectedFilters {
  margin-bottom: 20px !important;
  padding: 15px 18px !important;
  background: #fff !important;
  border: 1px solid #e0e0e0 !important;
  border-radius: 10px !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

/* Clear all button - prominent red button on white background */
#amazzing_filter .selectedFilters .clearAll {
  margin-bottom: 12px !important;
  background: #fff !important;
  padding: 0 !important;
}

#amazzing_filter .selectedFilters .clearAll a {
  display: inline-flex !important;
  align-items: center !important;
  background: #ff0000 !important;
  color: #fff !important;
  font-weight: 700 !important;
  font-size: 12px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px;
  padding: 8px 16px !important;
  border-radius: 6px !important;
  text-decoration: none !important;
  transition: background 0.2s ease;
  line-height: 1 !important;
}

#amazzing_filter .selectedFilters .clearAll a:hover {
  background: #cc0000 !important;
  text-decoration: none !important;
}

#amazzing_filter .selectedFilters .clearAll a .txt {
  margin: 0 6px 0 0 !important;
  line-height: 1 !important;
}

#amazzing_filter .selectedFilters .clearAll a i {
  font-size: 12px !important;
  line-height: 1 !important;
  vertical-align: middle !important;
}

/* Active filter pills */
#amazzing_filter .selectedFilters .cf {
  display: inline-flex !important;
  align-items: center !important;
  background: #f5f5f5 !important;
  color: #333 !important;
  border: 1px solid #ddd !important;
  padding: 6px 30px 6px 14px !important;
  border-radius: 20px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  margin: 4px 6px 4px 0 !important;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative !important;
  min-height: 30px !important;
  line-height: 1.3 !important;
  height: auto !important;
}

#amazzing_filter .selectedFilters .cf:hover {
  background: #ffecec !important;
  border-color: #ff0000 !important;
  color: #ff0000 !important;
}

/* Close X button inside pill - fix absolute positioning */
#amazzing_filter .selectedFilters .cf .close {
  position: absolute !important;
  right: 10px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  left: auto !important;
  margin: 0 !important;
  font-size: 14px !important;
  opacity: 0.5;
  line-height: 1 !important;
  color: #333 !important;
}

#amazzing_filter .selectedFilters .cf:hover .close {
  opacity: 1;
  color: #ff0000 !important;
}

/* --- Toggle content (collapsed state) --- */
.af_filter.closed .af_subtitle::after {
  transform: rotate(180deg);
}

/* --- Responsive compact mode --- */
@media (max-width: 767px) {
  .af_filter {
    margin-bottom: 12px !important;
    border-radius: 8px !important;
  }

  .af_filter .af_subtitle {
    padding: 9px 12px !important;
    font-size: 12px !important;
  }

  .af_filter .af_filter_content {
    padding: 12px 14px 14px !important;
  }
}

/* --- Load more button --- */
#amazzing_filter .toggle-cut-off,
#amazzing_filter .toggleMoreFilters {
  color: #ff0000 !important;
  font-size: 12px !important;
  font-weight: 600;
  cursor: pointer;
  padding: 5px 0;
}

#amazzing_filter .toggle-cut-off:hover,
#amazzing_filter .toggleMoreFilters:hover {
  text-decoration: underline;
}

/* --- Scrollbar for long lists --- */
.af_filter ul::-webkit-scrollbar {
  width: 5px;
}

.af_filter ul::-webkit-scrollbar-track {
  background: #f5f5f5;
  border-radius: 3px;
}

.af_filter ul::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

.af_filter ul::-webkit-scrollbar-thumb:hover {
  background: #ff0000;
}
