/* ═══════════════════════════════════════════════
   ALFA 스타일 필터 패널 (FCF v1.0.2)
   카페24 스마트디자인 통합용
   ═══════════════════════════════════════════════ */

.alfa-filter-trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 20px;
}
.alfa-filter-trigger__btn {
  padding: 10px 20px;
  background: #111;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: .03em;
}
.alfa-filter-trigger__btn:hover {
  background: #000;
}
.alfa-filter-trigger__count {
  font-size: 14px;
  color: #6b7280;
}
.alfa-filter-trigger__count strong {
  color: #111;
  font-size: 16px;
}

/* ── 필터 패널 ───────────────────────────────── */
.alfa-filter-panel {
  position: fixed;
  top: 0;
  right: -420px;
  width: 380px;
  max-width: 90vw;
  height: 100vh;
  background: #fff;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 30px rgba(0,0,0,.15);
  transition: right .3s ease;
}
.alfa-filter-panel.is-open { right: 0; }

.alfa-filter-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.alfa-filter-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.alfa-filter-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
}
.alfa-filter-panel__title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .02em;
}
.alfa-filter-panel__close {
  width: 36px; height: 36px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}
.alfa-filter-panel__close:hover { background: #f3f4f6; }

.alfa-filter-panel__body {
  flex: 1;
  overflow-y: auto;
  padding: 0 24px;
}

.alfa-filter-panel__footer {
  display: flex;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid #e5e7eb;
  flex-shrink: 0;
  background: #fff;
}

/* ── 섹션 ─────────────────────────────────────── */
.alfa-filter-section {
  padding: 22px 0;
  border-bottom: 1px solid #f3f4f6;
}
.alfa-filter-section:last-child { border-bottom: none; }

.alfa-filter-section__title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin: 0 0 14px;
  color: #111;
}

/* ── 라디오 / 체크박스 리스트 ───────────────── */
.alfa-filter-radio,
.alfa-filter-check {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.alfa-filter-check--2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
}

.alfa-filter-radio__item,
.alfa-filter-check__item {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 14px;
  color: #374151;
  line-height: 1.4;
}
.alfa-filter-radio__item input,
.alfa-filter-check__item input {
  margin-right: 10px;
  width: 16px;
  height: 16px;
  accent-color: #111;
  cursor: pointer;
}
.alfa-filter-radio__item:hover,
.alfa-filter-check__item:hover {
  color: #111;
}

/* ── 색상 스와치 ─────────────────────────────── */
.alfa-filter-colors {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
}
.alfa-filter-colors__item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: #374151;
}
.alfa-filter-colors__item input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.alfa-color-swatch {
  display: inline-block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid transparent;
  flex-shrink: 0;
  transition: transform .15s, border-color .15s;
}
.alfa-color-swatch--white {
  border-color: #d1d5db !important;
}
.alfa-filter-colors__item:hover .alfa-color-swatch {
  transform: scale(1.15);
}
.alfa-filter-colors__item input:checked ~ .alfa-color-swatch {
  border-color: #111;
  transform: scale(1.1);
}
.alfa-filter-colors__item input:checked + .alfa-color-swatch + span {
  font-weight: 700;
  color: #111;
}

/* ── 사이즈 그리드 ───────────────────────────── */
.alfa-filter-sizes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}
.alfa-filter-sizes__item {
  display: block;
  cursor: pointer;
}
.alfa-filter-sizes__item input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.alfa-filter-sizes__item span {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 4px;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  font-size: 12px;
  text-align: center;
  background: #fff;
  transition: all .15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.alfa-filter-sizes__item:hover span {
  border-color: #9ca3af;
}
.alfa-filter-sizes__item input:checked + span {
  background: #111;
  color: #fff;
  border-color: #111;
  font-weight: 600;
}

/* ── 가격 입력 ───────────────────────────────── */
.alfa-filter-price {
  display: flex;
  align-items: center;
  gap: 8px;
}
.alfa-filter-price input {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 13px;
  text-align: right;
  width: 0; /* flex 안에서 수축 */
}
.alfa-filter-price__sep { color: #9ca3af; }

/* ── Footer 버튼 ─────────────────────────────── */
.alfa-filter-footer__reset,
.alfa-filter-footer__apply {
  flex: 1;
  height: 48px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .04em;
  cursor: pointer;
  transition: all .15s;
}
.alfa-filter-footer__reset {
  background: #fff;
  color: #111;
  border: 1px solid #111;
}
.alfa-filter-footer__reset:hover {
  background: #f3f4f6;
}
.alfa-filter-footer__apply {
  background: #111;
  color: #fff;
}
.alfa-filter-footer__apply:hover {
  background: #000;
}

/* ── 결과 카운트 ─────────────────────────────── */
.fcf-no-result {
  text-align: center;
  padding: 60px 20px;
  color: #9ca3af;
  font-size: 15px;
}

/* 상품 카드 숨김 */
.fcf-hidden { display: none !important; }

/* 모바일 */
@media (max-width: 768px) {
  .alfa-filter-panel {
    width: 100%;
    max-width: 100%;
    right: -100%;
  }
  .alfa-filter-sizes {
    grid-template-columns: repeat(4, 1fr);
  }
}
