/* 리스트 공통 — 옵션 선택 패널 */
.clf-options-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 108px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid #d5dbe3;
  border-radius: 6px;
  background: #fff;
  color: #333;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  box-sizing: border-box;
  transition: border-color 0.18s ease, color 0.18s ease, background-color 0.18s ease;
}
.clf-options-btn:hover {
  border-color: #b8c0cb;
  background: #fafbfc;
}
.clf-options-btn.is-active {
  border-color: #e31c23;
  color: #e31c23;
  background: #fff7f7;
}
.clf-options-btn__label {
  flex: 1 1 auto;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.clf-options-btn__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #e31c23;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  flex: 0 0 auto;
}
.clf-options-btn__count[hidden] {
  display: none !important;
}

.clf-options-root {
  position: fixed;
  inset: 0;
  z-index: 12000;
}
.clf-options-root[hidden] {
  display: none !important;
}
.clf-options-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.48);
}
.clf-options-panel {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(880px, calc(100vw - 28px));
  max-height: min(84vh, 720px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 22px 56px rgba(15, 23, 42, 0.28);
  overflow: hidden;
}
.clf-options-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid #eef1f5;
  flex: 0 0 auto;
}
.clf-options-panel__head-text {
  min-width: 0;
}
.clf-options-panel__title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #111;
  letter-spacing: -0.02em;
}
.clf-options-panel__sub {
  margin: 4px 0 0;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.4;
}
.clf-options-panel__sub strong {
  color: #e31c23;
  font-weight: 700;
}
.clf-options-panel__close {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: #f3f4f6;
  color: #333;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
}
.clf-options-panel__close:hover {
  background: #e8eaed;
}

.clf-options-cats {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid #eef1f5;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  flex: 0 0 auto;
  scrollbar-width: none;
}
.clf-options-cats::-webkit-scrollbar {
  display: none;
}
.clf-options-cat {
  flex: 0 0 auto;
  height: 34px;
  padding: 0 14px;
  border: 1px solid #e1e6ed;
  border-radius: 999px;
  background: #fff;
  color: #555;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.clf-options-cat.is-on {
  border-color: #e31c23;
  background: #e31c23;
  color: #fff;
}

.clf-options-panel__body {
  padding: 8px 14px 16px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1 1 auto;
}
.clf-options-section {
  display: none;
  padding: 8px 0 4px;
}
.clf-options-section.is-on {
  display: block;
}
.clf-options-section__title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: -0.01em;
}

.clf-options-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.clf-options-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 8px 12px 8px 10px;
  border: 1px solid #d9dee5;
  border-radius: 999px;
  background: #fff;
  color: #333;
  font-size: 13px;
  line-height: 1.25;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}
.clf-options-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.clf-options-chip__mark {
  width: 16px;
  height: 16px;
  border: 1.5px solid #c5ccd6;
  border-radius: 4px;
  background: #fff;
  flex: 0 0 auto;
  box-sizing: border-box;
  position: relative;
}
.clf-options-chip__mark::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.12s ease;
}
.clf-options-chip.is-on {
  border-color: #e31c23;
  background: #fff5f5;
  color: #c4161c;
  font-weight: 600;
}
.clf-options-chip.is-on .clf-options-chip__mark {
  border-color: #e31c23;
  background: #e31c23;
}
.clf-options-chip.is-on .clf-options-chip__mark::after {
  transform: rotate(45deg) scale(1);
}
.clf-options-chip:hover {
  border-color: #b8c0cb;
}

.clf-options-panel__foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid #eef1f5;
  flex: 0 0 auto;
  background: #fafbfc;
}
.clf-options-panel__clear,
.clf-options-panel__apply {
  min-width: 96px;
  height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.clf-options-panel__clear {
  border: 1px solid #d5dbe3;
  background: #fff;
  color: #444;
}
.clf-options-panel__apply {
  border: 0;
  background: #e31c23;
  color: #fff;
}
.clf-options-panel__apply:hover {
  background: #cb171e;
}

.car-list-filter-inline--options,
.car-list-filter-mo-options,
.charocha-mo-car-search-field--options {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.car-list-filter-mo-options .clf-options-btn,
.charocha-mo-car-search-field--options .clf-options-btn {
  width: 100%;
  height: 42px;
}

/* 차로차 PC: select와 같은 폭/높이 */
.charocha-list-page .clf-options-btn.sale_select {
  flex: 1 1 0;
  min-width: 0;
  max-width: 100%;
  height: auto;
  min-height: 38px;
  padding: 9px 12px;
}

html.clf-options-open,
html.clf-options-open body {
  overflow: hidden;
}

@media (max-width: 999px) {
  .clf-options-panel {
    left: 0;
    right: 0;
    top: auto;
    bottom: 0;
    transform: none;
    width: 100%;
    max-height: 90vh;
    border-radius: 16px 16px 0 0;
  }
  .clf-options-panel__head {
    padding: 14px 14px 10px;
  }
  .clf-options-panel__body {
    padding: 6px 12px 14px;
  }
  .clf-options-section__title {
    display: none;
  }
}
