/* ═══════════════════════════════════════════════
   NOIR ATLAS — FILTER BAR
   Obsidian · Champagne Gold · Syne + DM Serif
   All IDs/classes intact — zero JS changes
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@500;600;700&family=DM+Serif+Display:ital@1&display=swap');

/* ── TOKENS ────────────────────────────────── */
:root {
  --na-obs:        #0E0D0B;
  --na-obs-2:      #161411;
  --na-obs-3:      #1C1A16;
  --na-obs-4:      #242018;
  --na-gold:       #C9A84C;
  --na-gold-lt:    #E2C06A;
  --na-gold-dim:   rgba(201,168,76,0.18);
  --na-gold-glow:  rgba(201,168,76,0.10);
  --na-cream:      #F0EBE0;
  --na-cream-2:    #C8B898;
  --na-cream-4:    #706050;
  --na-border:     rgba(201,168,76,0.16);
  --na-border-md:  rgba(201,168,76,0.28);
}

/* ── FILTER CONTAINER ──────────────────────── */
#filterContainer {
  position: sticky !important;
  top: 127px !important;
  z-index: 999 !important;
  background: #0E0D0B !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid var(--na-border) !important;
  box-shadow: inset 0 1px 0 rgba(201,168,76,0.18) !important;
  overflow: visible !important;
  padding: 10px 16px !important;
  display: block !important;
}



@media (max-width: 963px) {
  #filterContainer {
    top: 113px !important;
    padding: 8px 12px !important;
    gap: 5px !important;
  }
}

body:not(.dark-mode) #filterContainer {
  background: rgba(252,250,246,0.97) !important;
  box-shadow: inset 0 1px 0 rgba(138,106,30,0.14),
              0 1px 0 rgba(26,20,12,0.06) !important;
}

/* ── SHARED BUTTON BASE ────────────────────── */
#filterContainer .filters,
#filterContainer .filter-btn,
#filterContainer .category-toggle-btn {
  all: unset !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  height: 32px !important;
  padding: 0 14px !important;
  border: 1px solid var(--na-border) !important;
  border-radius: 2px !important;
  background: transparent !important;
  color: var(--na-cream-2) !important;
  font-family: 'Syne', system-ui, sans-serif !important;
  font-size: 9.5px !important;
  font-weight: 600 !important;
  letter-spacing: 1.4px !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
  cursor: pointer !important;
  transition: all 0.18s ease !important;
  flex-shrink: 0 !important;
  position: relative !important;
}

#filterContainer .filters:hover,
#filterContainer .filter-btn:hover,
#filterContainer .category-toggle-btn:hover {
  border-color: var(--na-border-md) !important;
  color: var(--na-gold-lt) !important;
  background: var(--na-gold-glow) !important;
}

/* Active state */
#filterContainer .filters.active,
#filterContainer .filter-btn.active,
#filterContainer .category-toggle-btn.active {
  background: var(--na-gold-dim) !important;
  border-color: var(--na-gold) !important;
  color: var(--na-gold-lt) !important;
}

/* Light mode buttons */
body:not(.dark-mode) #filterContainer .filters,
body:not(.dark-mode) #filterContainer .filter-btn,
body:not(.dark-mode) #filterContainer .category-toggle-btn {
  border-color: rgba(138,106,30,0.22) !important;
  color: #6A5020 !important;
  background: transparent !important;
}

body:not(.dark-mode) #filterContainer .filters:hover,
body:not(.dark-mode) #filterContainer .filter-btn:hover,
body:not(.dark-mode) #filterContainer .category-toggle-btn:hover {
  border-color: rgba(138,106,30,0.50) !important;
  color: #8A6A1E !important;
  background: rgba(138,106,30,0.06) !important;
}

body:not(.dark-mode) #filterContainer .filters.active,
body:not(.dark-mode) #filterContainer .filter-btn.active {
  background: rgba(138,106,30,0.10) !important;
  border-color: #8A6A1E !important;
  color: #8A6A1E !important;
}

/* ── DROPDOWN ICON ─────────────────────────── */
#filterContainer .category-toggle-btn .dropdown-icon,
#filterContainer .category-toggle-btn svg {
  width: 14px !important;
  height: 14px !important;
  fill: currentColor !important;
  flex-shrink: 0 !important;
  transition: transform 0.2s ease !important;
}

/* ── CATEGORY DROPDOWN ─────────────────────── */
.category-dropdown {
  position: relative !important;
  display: inline-block !important;
}

#categoryMenu {
  position: absolute !important;
  top: calc(100% + 8px) !important;
  left: 0 !important;
  min-width: 190px !important;
  background: #161411 !important;
  border: 1px solid var(--na-border-md) !important;
  border-radius: 3px !important;
  box-shadow:
    0 4px 12px rgba(0,0,0,0.60),
    0 16px 40px rgba(0,0,0,0.40) !important;
  z-index: 99999 !important;
  overflow: hidden !important;
  overflow-y: auto !important;
  max-height: 280px !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(201,168,76,0.25) transparent !important;

  /* Gold top hairline */
  box-shadow:
    inset 0 1px 0 rgba(201,168,76,0.22),
    0 4px 12px rgba(0,0,0,0.60),
    0 16px 40px rgba(0,0,0,0.40) !important;
}

#categoryMenu::-webkit-scrollbar { width: 3px !important; }
#categoryMenu::-webkit-scrollbar-thumb {
  background: rgba(201,168,76,0.25) !important;
  border-radius: 2px !important;
}

#categoryMenu.hidden { display: none !important; }

body:not(.dark-mode) #categoryMenu {
  background: #FDFAF5 !important;
  border-color: rgba(138,106,30,0.22) !important;
  box-shadow:
    inset 0 1px 0 rgba(138,106,30,0.15),
    0 4px 16px rgba(26,20,12,0.10),
    0 16px 40px rgba(26,20,12,0.08) !important;
}

/* Category items */
.category-item {
  padding: 10px 16px !important;
  font-family: 'Syne', system-ui, sans-serif !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  letter-spacing: 1.2px !important;
  text-transform: uppercase !important;
  color: var(--na-cream-2) !important;
  border-bottom: 1px solid rgba(201,168,76,0.07) !important;
  cursor: pointer !important;
  transition: all 0.14s ease !important;
}

.category-item:last-child { border-bottom: none !important; }

.category-item:hover {
  background: var(--na-gold-glow) !important;
  color: var(--na-gold-lt) !important;
  padding-left: 20px !important;
}

.category-item.active {
  color: var(--na-gold) !important;
  background: var(--na-gold-dim) !important;
}

body:not(.dark-mode) .category-item {
  color: #4A3818 !important;
  border-bottom-color: rgba(138,106,30,0.08) !important;
}

body:not(.dark-mode) .category-item:hover {
  background: rgba(138,106,30,0.06) !important;
  color: #8A6A1E !important;
}

body:not(.dark-mode) .category-item.active {
  color: #7A5C14 !important;
  background: rgba(138,106,30,0.10) !important;
}

/* ── SORT DROPDOWN ─────────────────────────── */
.filter-dropdown {
  position: relative !important;
  display: inline-block !important;
}

#sortMenu {
  position: absolute !important;
  top: calc(100% + 8px) !important;
  left: 0 !important;
  min-width: 180px !important;
  background: #161411 !important;
  border: 1px solid var(--na-border-md) !important;
  border-radius: 3px !important;
z-index: 99999 !important;
  overflow: hidden !important;
  padding: 4px !important;
  box-shadow:
    inset 0 1px 0 rgba(201,168,76,0.22),
    0 4px 12px rgba(0,0,0,0.60),
    0 16px 40px rgba(0,0,0,0.40) !important;
}

#sortMenu.hidden { display: none !important; }

body:not(.dark-mode) #sortMenu {
  background: #FDFAF5 !important;
  border-color: rgba(138,106,30,0.22) !important;
  box-shadow:
    inset 0 1px 0 rgba(138,106,30,0.15),
    0 4px 16px rgba(26,20,12,0.10) !important;
}

.sort-item {
  padding: 9px 14px !important;
  font-family: 'Syne', system-ui, sans-serif !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  letter-spacing: 1.2px !important;
  text-transform: uppercase !important;
  color: var(--na-cream-2) !important;
  border-radius: 2px !important;
  cursor: pointer !important;
  transition: all 0.14s ease !important;
}

.sort-item:hover {
  background: var(--na-gold-glow) !important;
  color: var(--na-gold-lt) !important;
}

.sort-item.active {
  color: var(--na-gold) !important;
  background: var(--na-gold-dim) !important;
}

body:not(.dark-mode) .sort-item {
  color: #4A3818 !important;
}

body:not(.dark-mode) .sort-item:hover {
  background: rgba(138,106,30,0.06) !important;
  color: #8A6A1E !important;
}

body:not(.dark-mode) .sort-item.active {
  color: #7A5C14 !important;
  background: rgba(138,106,30,0.10) !important;
}

/* ── PRICE FILTER PANEL ────────────────────── */
#price-filter-panel {
  position: fixed !important;
  top: 34px !important;
  right: -100% !important;
  width: min(340px, 88vw) !important;
  height: 100% !important;
  background: #161411 !important;
  border-left: 1px solid var(--na-border-md) !important;
  box-shadow: -8px 0 40px rgba(0,0,0,0.60) !important;
  z-index: 2000 !important;
  transition: right 0.32s cubic-bezier(0.4,0,0.2,1) !important;
  padding: 32px 24px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 20px !important;
}

#price-filter-panel.open { right: 0 !important; }

body:not(.dark-mode) #price-filter-panel {
  background: #FDFAF5 !important;
  border-left-color: rgba(138,106,30,0.22) !important;
  box-shadow: -8px 0 40px rgba(26,20,12,0.12) !important;
}

/* Gold top accent on panel */
#price-filter-panel::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important; left: 0 !important; right: 0 !important;
  height: 2px !important;
  background: linear-gradient(90deg, transparent, var(--na-gold), transparent) !important;
}

#price-filter-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
}

#price-filter-header span:first-child {
  font-family: 'DM Serif Display', Georgia, serif !important;
  font-style: italic !important;
  font-size: 22px !important;
  font-weight: 400 !important;
  color: var(--na-cream) !important;
  letter-spacing: -0.01em !important;
}

body:not(.dark-mode) #price-filter-header span:first-child {
  color: #1A140C !important;
}

#close-price-filter {
  width: 32px !important;
  height: 32px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid var(--na-border) !important;
  border-radius: 2px !important;
  color: var(--na-cream-2) !important;
  font-size: 14px !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

#close-price-filter:hover {
  border-color: var(--na-border-md) !important;
  color: var(--na-gold-lt) !important;
  background: var(--na-gold-glow) !important;
}

body:not(.dark-mode) #close-price-filter {
  color: #6A5020 !important;
  border-color: rgba(138,106,30,0.22) !important;
}

/* Price label */
#price-filter-panel::after {
  content: 'Set Price Range' !important;
  font-family: 'Syne', system-ui, sans-serif !important;
  font-size: 8.5px !important;
  font-weight: 700 !important;
  letter-spacing: 2px !important;
  text-transform: uppercase !important;
  color: rgba(201,168,76,0.40) !important;
  margin-top: -12px !important;
}

.price-inputs {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}

.price-inputs input {
  display: block !important;
  width: 100% !important;
  padding: 12px 14px !important;
  background: var(--na-obs-3) !important;
  border: 1px solid var(--na-border) !important;
  border-radius: 2px !important;
  color: var(--na-cream) !important;
  font-family: 'DM Serif Display', Georgia, serif !important;
  font-style: italic !important;
  font-size: 16px !important;
  outline: none !important;
  transition: border-color 0.15s !important;
  box-sizing: border-box !important;
}

.price-inputs input::placeholder {
  color: var(--na-cream-4) !important;
  font-style: italic !important;
  opacity: 1 !important;
}

.price-inputs input:focus {
  border-color: var(--na-border-md) !important;
}

body:not(.dark-mode) .price-inputs input {
  background: #F5F0E8 !important;
  border-color: rgba(138,106,30,0.22) !important;
  color: #1A140C !important;
}

body:not(.dark-mode) .price-inputs input:focus {
  border-color: rgba(138,106,30,0.50) !important;
}

#apply-price-filter {
  width: 100% !important;
  padding: 13px !important;
  background: var(--na-gold) !important;
  color: #0E0D0B !important;
  border: none !important;
  border-radius: 2px !important;
  font-family: 'Syne', system-ui, sans-serif !important;
  font-size: 9.5px !important;
  font-weight: 700 !important;
  letter-spacing: 2px !important;
  text-transform: uppercase !important;
  cursor: pointer !important;
  transition: background 0.18s ease !important;
  margin-top: 4px !important;
}

#apply-price-filter:hover {
  background: var(--na-gold-lt) !important;
}

/* ── SORT TAG ──────────────────────────────── */
#sortTagWrap {
  display: flex !important;
  justify-content: center !important;
  padding: 8px 16px 0 !important;
  pointer-events: none !important;
}

#sortTagWrap.hidden { display: none !important; }

#activeSortTag {
  pointer-events: auto !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 7px 16px 7px 14px !important;
  background: var(--na-gold-glow) !important;
  border: 1px solid var(--na-border-md) !important;
  border-radius: 2px !important;
  animation: sortTagIn 0.26s cubic-bezier(0.2,0.9,0.2,1) both !important;
}

#activeSortText {
  font-family: 'Syne', system-ui, sans-serif !important;
  font-size: 9px !important;
  font-weight: 700 !important;
  letter-spacing: 1.6px !important;
  text-transform: uppercase !important;
  color: var(--na-gold) !important;
}

body:not(.dark-mode) #activeSortText {
  color: #7A5C14 !important;
}

body:not(.dark-mode) #activeSortTag {
  background: rgba(138,106,30,0.07) !important;
  border-color: rgba(138,106,30,0.28) !important;
}

#clearSortBtn {
  background: transparent !important;
  border: none !important;
  color: var(--na-cream-4) !important;
  font-size: 11px !important;
  cursor: pointer !important;
  width: 22px !important;
  height: 22px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 2px !important;
  transition: all 0.14s ease !important;
  padding: 0 !important;
}

#clearSortBtn:hover {
  background: var(--na-gold-glow) !important;
  color: var(--na-gold-lt) !important;
}

@keyframes sortTagIn {
  from { opacity: 0; transform: translateY(-5px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── ACTIVE FILTER TAGS ────────────────────── */
.active-filters {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  padding: 6px 16px 0 !important;
}

.filter-tag {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 5px 12px !important;
  background: var(--na-gold-glow) !important;
  border: 1px solid var(--na-border-md) !important;
  border-radius: 2px !important;
  font-family: 'Syne', system-ui, sans-serif !important;
  font-size: 9px !important;
  font-weight: 600 !important;
  letter-spacing: 1.2px !important;
  text-transform: uppercase !important;
  color: var(--na-gold) !important;
}

.filter-tag span {
  color: var(--na-cream-4) !important;
  cursor: pointer !important;
  font-size: 11px !important;
  line-height: 1 !important;
  transition: color 0.14s !important;
  margin-left: 2px !important;
}

.filter-tag span:hover { color: var(--na-gold-lt) !important; }

body:not(.dark-mode) .filter-tag {
  color: #7A5C14 !important;
  background: rgba(138,106,30,0.07) !important;
  border-color: rgba(138,106,30,0.28) !important;
}

body:not(.dark-mode) .filter-tag span {
  color: #8A7060 !important;
}
.filter-scroll-inner {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 6px !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
  scrollbar-width: none !important;
  width: 100% !important;
}

.filter-scroll-inner::-webkit-scrollbar {
  display: none !important;
}
@media (max-width: 430px) {

  .filter-scroll-inner {
    overflow-x: auto !important;
    overflow-y: visible !important;
    flex-wrap: nowrap !important;
  }
}
#filterContainer {
  display: block !important;
  flex-wrap: unset !important;
}
#categoryMenu {
  position: fixed !important;
  top: auto !important;
  left: auto !important;
}

#sortMenu {
  position: fixed !important;
  top: auto !important;
  left: auto !important;
}
#price-filter-overlay {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(0,0,0,0.55) !important;
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
  z-index: 1999 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity 0.38s ease !important;
}

#price-filter-panel.open ~ #price-filter-overlay,
#price-filter-overlay.open {
  opacity: 1 !important;
  pointer-events: auto !important;
}

body.dark-mode #filterContainer {
  background: #0E0D0B !important;
}

