/* ===== PartsFilter Enhanced Selector ===== */

.pf-enhanced {
  background: #0d0d0d;
  padding: 16px 0 18px;
  border-bottom: 3px solid #c0392b;
  position: relative;
  overflow: visible !important;
  z-index: 500 !important;
  clear: both;
}
.pf-enhanced .container {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

/* Title */
.pf-title {
  width: 100%;
  margin: 0 0 12px 0;
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  letter-spacing: .3px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pf-title span {
  color: #c0392b;
  font-size: 28px;
}

/* Type pills (level 0) */
.pf-types {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.pf-type-btn {
  background: #1a1a1a;
  color: #ccc;
  border: 2px solid #555;
  border-radius: 6px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: .5px;
  line-height: 1;
  -webkit-appearance: none;
  appearance: none;
  font-family: inherit;
}
.pf-type-btn:hover {
  border-color: #c0392b;
  color: #fff;
  background: #222;
}
.pf-type-btn.active {
  background: #c0392b;
  color: #fff;
  border-color: #c0392b;
}

/* Searchable select wrapper */
.pf-field {
  position: relative;
  flex: 1;
  min-width: 150px;
}
.pf-field-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: #e8a500;
  margin-bottom: 4px;
  letter-spacing: .5px;
}
.pf-input {
  width: 100%;
  height: 42px;
  padding: 8px 32px 8px 12px;
  border: 2px solid #666;
  border-radius: 6px;
  background: #1a1a1a;
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color .2s;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}
.pf-input::placeholder { color: #888; }
.pf-input:focus { border-color: #c0392b; }
.pf-input:disabled {
  opacity: .5;
  cursor: not-allowed;
  border-color: #444;
  color: #666;
}
.pf-input:disabled::placeholder { color: #555; }
.pf-input.pf-has-value { color: #fff; font-weight: 600; }

.pf-arrow {
  position: absolute;
  right: 10px;
  bottom: 12px;
  pointer-events: none;
  color: #999;
  font-size: 14px;
}

/* Dropdown list */
.pf-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #1a1a1a;
  border: 2px solid #c0392b;
  border-top: none;
  border-radius: 0 0 6px 6px;
  max-height: 300px;
  overflow-y: auto;
  box-shadow: 0 12px 32px rgba(0,0,0,.7);
}
.pf-dropdown.open { display: block; }

.pf-dropdown-group {
  padding: 6px 0;
  border-bottom: 1px solid #333;
}
.pf-dropdown-group:last-child { border-bottom: none; }
.pf-dropdown-group-title {
  padding: 4px 14px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: #e8a500;
  letter-spacing: .5px;
}

.pf-option {
  padding: 9px 14px;
  font-size: 13px;
  color: #ddd;
  cursor: pointer;
  transition: background .1s;
}
.pf-option:hover, .pf-option.highlighted {
  background: #c0392b;
  color: #fff;
}

.pf-no-results {
  padding: 16px;
  text-align: center;
  color: #888;
  font-size: 13px;
}

/* Scrollbar styling */
.pf-dropdown::-webkit-scrollbar { width: 6px; }
.pf-dropdown::-webkit-scrollbar-track { background: #111; }
.pf-dropdown::-webkit-scrollbar-thumb { background: #c0392b; border-radius: 3px; }

/* Go button */
.pf-go-btn {
  background: #c0392b;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0 24px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s;
  height: 42px;
  display: none;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
}
.pf-go-btn:hover { background: #e74c3c; }
.pf-go-btn.visible { display: flex; }

/* Reset button */
.pf-reset {
  background: none;
  border: 2px solid #666;
  border-radius: 6px;
  color: #aaa;
  cursor: pointer;
  font-size: 20px;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all .15s;
  -webkit-appearance: none;
  appearance: none;
  font-family: inherit;
  line-height: 1;
  padding: 0;
}
.pf-reset:hover { color: #c0392b; border-color: #c0392b; }

/* Force clickability */
.pf-enhanced,
.pf-enhanced * {
  pointer-events: auto !important;
}
.pf-enhanced .pf-type-btn,
.pf-enhanced .pf-input,
.pf-enhanced .pf-go-btn,
.pf-enhanced .pf-reset {
  position: relative;
  z-index: 501;
}

/* ===== Responsive ===== */
@media (max-width: 991px) {
  .pf-enhanced .container {
    flex-wrap: wrap;
  }
  .pf-types {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .pf-type-btn { padding: 8px 14px; font-size: 12px; }
  .pf-field { min-width: calc(50% - 8px); }
}
@media (max-width: 575px) {
  .pf-enhanced { padding: 12px 0 14px; }
  .pf-title { font-size: 18px; }
  .pf-field { min-width: 100%; }
  .pf-go-btn { width: 100%; justify-content: center; }
  .pf-reset { width: 100%; }
}

/* Mobile: progressive reveal - hide fields until needed */
@media (max-width: 991px) {
  .pf-field {
    display: none;
  }
  .pf-field.pf-visible {
    display: block;
  }
  .pf-go-btn {
    display: none;
  }
  .pf-go-btn.visible {
    display: flex;
  }
}
