/* ═══════════════════════════════════════════════════════════════
   MOBILE FILTER UI — only active on max-width: 991px
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 991px) {
  .ccf-sidebar {
    display: none !important;
  }
}
@media (min-width: 992px) {
  .mf-floating-bar,
  .mf-overlay,
  .mf-drawer {
    display: none !important;
  }
}

/* ── Floating Pill Bar ──────────────────────────────────────── */
.mf-floating-bar {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  z-index: 9;
  display: flex;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.66);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 8px;
  padding: 5px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
  white-space: nowrap;
}

.mf-floating-bar.mf-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* Hide pill bar while drawer is open */
.mf-floating-bar.mf-hidden {
  opacity: 0 !important;
  pointer-events: none !important;
}

.mf-pill-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 24px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: #404040;
  font-size: 15px;
  font-family: inherit;
  font-weight: 400;
  cursor: pointer;
  letter-spacing: 0.2px;
  transition:
    background 0.18s ease,
    color 0.18s ease;
  white-space: nowrap;
}

.mf-pill-btn.mf-has-active {
  background: #404040;
  color: #fff;
}

.mf-pill-badge {
  font-size: 11px;
  font-weight: 600;
  background: #c2b2a3;
  color: #fff;
  border-radius: 10px;
  padding: 1px 6px;
  min-width: 18px;
  text-align: center;
  line-height: 16px;
}
.mf-pill-btn.mf-has-active .mf-pill-badge {
  background: rgba(255, 255, 255, 0.8);
  color: #404040;
}

.mf-pill-divider {
  width: 1px;
  height: 20px;
  background: rgba(53, 53, 53, 0.2);
  flex-shrink: 0;
  margin: 0 2px;
}

/* ── Overlay ────────────────────────────────────────────────── */
.mf-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1010;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.mf-overlay.mf-open {
  opacity: 1;
  pointer-events: auto;
}

/* ── Drawer — slides in from LEFT, not full width ───────────── */
.mf-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 82vw; /* not full width — leaves gap on right */
  max-width: 360px;
  z-index: 1020;
  background: #fff;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
  overflow: hidden;
}

.mf-drawer.mf-open {
  transform: translateX(0);
}

/* Drawer header — TITLE left, X right */
.mf-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 20px 16px;
  border-bottom: 1px solid #f0f0f0;
  flex-shrink: 0;
}

.mf-drawer-title {
  font-size: 13px;
  font-weight: 700;
  color: #404040;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.mf-drawer-close {
  background: none;
  border: none;
  cursor: pointer;
  color: #404040;
  padding: 0;
  font-size: 20px;
  line-height: 1;
}

/* Scrollable body */
.mf-drawer-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: #e0d6cc transparent;
}
.mf-drawer-body::-webkit-scrollbar {
  width: 3px;
}
.mf-drawer-body::-webkit-scrollbar-thumb {
  background: #e0d6cc;
}

/* Footer */
.mf-drawer-footer {
  padding: 16px 20px 32px;
  border-top: 1px solid #f0f0f0;
  flex-shrink: 0;
}

.mf-apply-btn {
  width: 100%;
  padding: 15px;
  background: #404040;
  color: #fff;
  border: none;
  font-size: 12px;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background 0.2s;
}
.mf-apply-btn:hover {
  background: #000;
}

.mf-reset-link {
  display: block;
  text-align: center;
  margin-top: 12px;
  background: transparent;
  border: none;
  color: #929292;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  text-decoration: underline;
  padding: 4px;
}

/* ── Filter rows — label + chevron, full-width rows ─────────── */
.mf-filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 20px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  width: 100%;
  text-align: left;
  transition: background 0.15s;
  gap: 8px;
}
.mf-filter-row.mf-row-open {
  background: #fafafa;
}

.mf-filter-row-label {
  font-size: 12px;
  font-weight: 600;
  color: #404040;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex: 1;
}

.mf-filter-row-meta {
  font-size: 12px;
  color: #929292;
  flex-shrink: 0;
}

.mf-filter-chevron {
  color: #404040;
  transition: transform 0.2s;
  flex-shrink: 0;
}
.mf-filter-row.mf-row-open .mf-filter-chevron {
  transform: rotate(180deg);
}

/* Chip area — expands under the row */
.mf-filter-chips-wrap {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 20px 16px;
  border-bottom: 1px solid #f0f0f0;
  background: #fafafa;
}
.mf-filter-chips-wrap.mf-open {
  display: flex;
}

.mf-filter-chip {
  padding: 7px 14px;
  border: 1px solid #d0d0d0;
  background: #fff;
  font-size: 12px;
  font-weight: 500;
  color: #404040;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.mf-filter-chip:hover {
  border-color: #404040;
}
.mf-filter-chip.ccf-active {
  background: #404040;
  border-color: #404040;
  color: #fff;
}

/* ── Cities drawer: country rows ────────────────────────────── */
.mf-country-group {
  border-bottom: 1px solid #f0f0f0;
}

.mf-country-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 20px;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
  gap: 8px;
}
.mf-country-header:hover {
  background: #fafafa;
}
.mf-country-group.mf-expanded .mf-country-header {
  background: #fafafa;
}

.mf-country-name {
  font-size: 12px;
  font-weight: 600;
  color: #404040;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex: 1;
}

.mf-chevron {
  color: #404040;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.mf-country-group.mf-expanded .mf-chevron {
  transform: rotate(180deg);
}

.mf-country-expanded-body {
  display: none;
  padding: 12px 20px 16px;
  background: #fafafa;
  border-top: 1px solid #f0f0f0;
}
.mf-country-group.mf-expanded .mf-country-expanded-body {
  display: block;
}

.mf-country-chip {
  display: inline-block;
  margin-bottom: 10px;
  padding: 6px 14px;
  border: 1px solid #d0d0d0;
  background: #fff;
  font-size: 11px;
  font-weight: 500;
  color: #929292;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 0.03em;
}
.mf-country-chip.ccf-active {
  background: #404040;
  border-color: #404040;
  color: #fff;
}

.mf-city-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mf-city-chip {
  padding: 7px 14px;
  border: 1px solid #d0d0d0;
  background: #fff;
  font-size: 12px;
  font-weight: 500;
  color: #404040;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.mf-city-chip:hover {
  border-color: #404040;
}
.mf-city-chip.ccf-active {
  background: #404040;
  border-color: #404040;
  color: #fff;
}

/* ── Active filter pills (horizontal scroll above grid) ─────── */
@media (max-width: 991px) {
  #ccf-active-filters {
    padding: 0 16px 8px;
  }
  #ccf-pills {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 6px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  #ccf-pills::-webkit-scrollbar {
    display: none;
  }
  .ccf-pill {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background: #f1ebe5;
    border: 1px solid #e0d6cc;
    font-size: 11px;
    color: #404040;
    white-space: nowrap;
  }
  .ccf-pill-remove {
    background: none;
    border: none;
    color: #929292;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    line-height: 1;
  }
}
