﻿/* ============================================================
   ADVANCED SEARCH + FILTERS
   ============================================================ */

.tf-wrap {
  background: #fff;
  border-radius: 20px;
  padding: 26px 28px;
  margin-bottom: 40px;
  box-shadow: 0 12px 40px -12px rgba(0,0,0,.1);
  border: 1px solid #f0f1f3;
  position: relative;
  overflow: hidden;
}
.tf-wrap::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #c9a961, transparent);
}

/* Search row */
.tf-search-row {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.tf-search {
  flex: 1;
  position: relative;
  min-width: 240px;
}
.tf-search i {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #c9a961;
  font-size: 15px;
  pointer-events: none;
}
.tf-search input {
  width: 100%;
  padding: 15px 18px 15px 48px;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  font-size: 14.5px;
  font-family: inherit;
  color: #1f2937;
  background: #fff;
  transition: all .22s ease;
  box-sizing: border-box;
}
.tf-search input:focus {
  outline: none;
  border-color: #c9a961;
  box-shadow: 0 0 0 4px rgba(201,169,97,.14);
}
.tf-search input::placeholder { color: #9ca3af; }

.tf-sort {
  position: relative;
  min-width: 180px;
}
.tf-sort select {
  width: 100%;
  padding: 15px 40px 15px 18px;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  font-size: 14px;
  font-family: inherit;
  font-weight: 600;
  color: #1f2937;
  background: #fff;
  appearance: none;
  cursor: pointer;
  transition: all .22s ease;
  box-sizing: border-box;
}
.tf-sort select:focus {
  outline: none;
  border-color: #c9a961;
  box-shadow: 0 0 0 4px rgba(201,169,97,.14);
}
.tf-sort::after {
  content: "\f078";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #6b7280;
  font-size: 12px;
  pointer-events: none;
}

/* Filter row */
.tf-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid #f0f1f3;
}
.tf-filter-label {
  font-size: 12.5px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-right: 6px;
}

.tf-chip {
  padding: 9px 16px;
  border-radius: 999px;
  background: #f6f7f9;
  border: 1.5px solid transparent;
  color: #1f2937;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all .22s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.tf-chip i { font-size: 12px; color: #c9a961; }
.tf-chip:hover {
  background: #fdfbf6;
  border-color: rgba(201,169,97,.4);
  color: #b08f42;
}
.tf-chip.active {
  background: linear-gradient(135deg, #c9a961, #b08f42);
  border-color: #c9a961;
  color: #fff;
}
.tf-chip.active i { color: #fff; }

/* Reset + count */
.tf-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed #e5e7eb;
}
.tf-count {
  font-size: 13.5px;
  color: #6b7280;
  font-weight: 500;
}
.tf-count strong {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  color: #0d1117;
  font-weight: 700;
  letter-spacing: -.02em;
}
.tf-reset {
  padding: 9px 18px;
  background: transparent;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  color: #1f2937;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all .22s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tf-reset:hover {
  border-color: #c9a961;
  color: #b08f42;
  background: #fdfbf6;
}
.tf-reset i { font-size: 11px; }

/* No results */
.tf-empty {
  display: none;
  text-align: center;
  padding: 60px 20px;
  margin-top: 30px;
}
.tf-empty.show { display: block; }
.tf-empty i {
  font-size: 42px;
  color: #c9a961;
  opacity: .5;
  margin-bottom: 14px;
}
.tf-empty h3 {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  color: #0d1117;
  margin: 0 0 8px;
}
.tf-empty p {
  color: #6b7280;
  font-size: 14.5px;
  margin: 0 0 20px;
}

/* Hiding animation for cards */
.tf-hidden {
  display: none !important;
}

/* Category sections — highlight when empty */
.cat-section.tf-filtered-out {
  display: none;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .tf-wrap { padding: 20px 18px; }
  .tf-search-row { flex-direction: column; }
  .tf-search { min-width: 0; }
  .tf-sort { min-width: 0; }
  .tf-filters {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .tf-filter-label {
    margin-bottom: 4px;
  }
  .tf-chip {
    justify-content: center;
  }
  .tf-meta {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .tf-reset { width: 100%; justify-content: center; }
}