/* ---- Variables ---- */
:root {
  --cd-white: #ffffff;
  --cd-bg: #f8fafc;
  --cd-border: #e5e5e5;
  --cd-text: #0f172a;
  --cd-text-muted: #475569;
  --cd-text-subtle: #94a3b8;
  --cd-radius: 12px;
  --cd-radius-sm: 6px;
  --cd-radius-md: 8px;
  --cd-shadow-sm: 0px 1px 2px 0px rgba(0, 0, 0, 0.05);
  --cd-shadow-card:
    0px 1px 3px 0px rgba(0, 0, 0, 0.06), 0px 1px 2px -1px rgba(0, 0, 0, 0.04);
  --cd-shadow-drawer: -4px 0 24px rgba(0, 0, 0, 0.12);
  --cd-primary: #0ea5e9;
  --cd-primary-dark: #0284c7;
  --cd-badge-gft-bg: #dbeafe;
  --cd-badge-gft-border: #93c5fd;
  --cd-badge-gft-text: #1d4ed8;
  --cd-transition: 0.2s ease;
}

/* ---- Wrapper ---- */
.cd-wrap {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
  color: var(--cd-text);
  margin: 0 auto;
  padding: 24px;
  box-sizing: border-box;
}

/* ---- Header ---- */
.cd-header {
  margin-bottom: 32px;
}

.cd-title {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
  font-weight: 700;
  font-size: 30px;
  line-height: 36px;
  color: var(--cd-text);
  margin-bottom: 8px;
  padding: 0;
}

.cd-subtitle {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  color: var(--cd-text-muted);
  margin: 0;
}

/* ---- Filter Bar ---- */
.cd-filter-bar {
  display: flex !important;
  align-items: center;
  gap: 16px;
  padding: 17px;
  background: var(--cd-white);
  border: 1px solid #e2e8f0;
  border-radius: var(--cd-radius);
  box-shadow: var(--cd-shadow-sm);
  margin-bottom: 16px;
  flex-wrap: wrap;
  box-sizing: border-box;
  width: 100%;
}

/* Search */
.cd-search-wrap {
  position: relative;
  flex: 1 1 0%;
  min-width: 0;
  max-width: 100%;
}

.cd-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  display: block;
  line-height: 0;
}

.cd-search-icon svg {
  display: block;
  width: 16px;
  height: 16px;
}

.cd-search-input {
  display: block;
  width: 100%;
  height: 36px;
  padding: 0 12px 0 38px;
  border: 1px solid var(--cd-border);
  border-radius: var(--cd-radius-sm);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
  font-size: 14px;
  font-weight: 400;
  color: var(--cd-text);
  background: var(--cd-white);
  outline: none;
  box-sizing: border-box;
  transition: border-color var(--cd-transition);
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  line-height: normal;
}

.cd-search-input::placeholder {
  color: var(--cd-text-subtle);
}

.cd-search-input:focus {
  border-color: var(--cd-primary);
  box-shadow: none;
  outline: none;
}

/* Category Dropdown */
.cd-category-select {
  flex: 0 1 192px;
  min-width: 120px;
  width: auto;
}

.cd-category-select .gft-custom-select-trigger {
  height: 36px;
}

.gft-custom-select-trigger {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.gft-custom-select-trigger:focus,
.gft-custom-select-trigger:focus-visible,
.gft-custom-select-trigger:active,
.gft-custom-select-trigger:focus:active {
  background: var(--cd-white) !important;
  border-color: var(--cd-border) !important;
  outline: none !important;
  box-shadow: none !important;
}

.gft-custom-select-trigger.open:focus,
.gft-custom-select-trigger.open:active {
  background: var(--cd-white) !important;
  border-color: var(--cd-primary) !important;
}

/* Filters Button */
.cd-filters-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 16px;
  background: var(--cd-white);
  border: 1px solid var(--cd-border);
  border-radius: var(--cd-radius-sm);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  color: var(--cd-text);
  cursor: pointer;
  box-shadow: var(--cd-shadow-sm);
  transition:
    background var(--cd-transition),
    color var(--cd-transition),
    border-color var(--cd-transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.cd-filters-btn:hover {
  background: #f8fafc !important;
  color: var(--cd-text) !important;
  border-color: #cbd5e1;
}

.cd-filters-btn:focus {
  background: #f8fafc !important;
  color: var(--cd-text) !important;
  border-color: #cbd5e1;
}

.cd-filters-btn svg {
  display: block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.cd-filters-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: var(--cd-primary);
  color: var(--cd-white);
  border-radius: 50%;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
}

.cd-filters-count:empty {
  display: none;
}

/* View Switcher */
.cd-view-switcher {
  display: flex;
  align-items: center;
  background: var(--cd-white);
  border: 1px solid var(--cd-border);
  border-radius: var(--cd-radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  height: 36px;
}

.cd-view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 100%;
  background: transparent;
  border-radius: var(--cd-radius-sm);
  border: none;
  cursor: pointer;
  color: var(--cd-text-subtle);
  transition:
    background var(--cd-transition),
    color var(--cd-transition);
  padding: 0;
}

.cd-view-btn svg {
  display: block;
  width: 16px;
  height: 16px;
}

.cd-view-btn:hover {
  background: #f5f5f5;
  color: var(--cd-text-muted);
}

.cd-view-btn.active {
  background: #f5f5f5;
  color: var(--cd-text);
}

/* ---- Active Filters ---- */
.cd-active-filters {
  display: none;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 40px;
  min-height: 22px;
}

.cd-active-filters.has-filters {
  display: flex;
}

.cd-active-filters-label {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  color: var(--cd-text-muted);
}

.cd-active-filters-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.cd-filter-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 22px;
  padding: 0 10px;
  background: #fef3c7;
  border-radius: var(--cd-radius-sm);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
  font-size: 12px;
  line-height: 16px;
  font-weight: 12px;
  color: #b45309;
  white-space: nowrap;
}

.cd-filter-badge-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: #b45309;
  line-height: 1;
  flex-shrink: 0;
}

.cd-filter-badge-remove:hover {
  color: var(--cd-text);
}

.cd-filter-badge-remove svg {
  display: block;
  width: 12px;
  height: 12px;
}

.cd-clear-all {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
  font-size: 12px;
  margin-left: 11px;
  font-weight: 600;
  line-height: 16px;
  color: var(--cd-text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: color var(--cd-transition);
}

.cd-clear-all:hover {
  color: var(--cd-text);
  background: none;
}

/* ---- Results Count ---- */
.cd-results-count {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  color: var(--cd-text-muted);
  margin-bottom: 25px;
}

/* ---- Grid ---- */
.cd-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.cd-grid[data-view="list"] {
  grid-template-columns: minmax(0, 1fr);
}

@media (max-width: 1024px) {
  .cd-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .cd-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---- Card ---- */
.cd-card {
  background: var(--cd-white);
  border: 1px solid var(--cd-border);
  border-radius: var(--cd-radius);
  padding: 24.8px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition:
    box-shadow var(--cd-transition),
    border-color var(--cd-transition);
  cursor: pointer;
}

.cd-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-color: #d1d5db;
}

.cd-grid[data-view="list"] .cd-card {
  flex-direction: row;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
}

.cd-grid[data-view="list"] .cd-card-header {
  flex: 1;
  min-width: 0;
}

.cd-grid[data-view="list"] .cd-card-description {
  flex-basis: 100%;
}

/* Card Header */
.cd-card-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.cd-card-avatar {
  width: 64px;
  height: 64px;
  background: #e2e8f0;
  border-radius: var(--cd-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
  font-size: 18px;
  font-weight: 400;
  color: var(--cd-text-muted);
  flex-shrink: 0;
  border: 1px solid #f1f5f9;
}

.cd-card-meta {
  flex: 1;
  min-width: 0;
}

.cd-card-name {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  color: var(--cd-text);
  margin-bottom: 6px;
  padding: 0;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  word-break: break-word;
}

.cd-card-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* Badges */
.cd-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 10.8px;
  border-radius: var(--cd-radius-sm);
  border: 1px solid transparent;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  white-space: nowrap;
}

.cd-badge-gft {
  background: #00a3e0;
  border-color: #00a3e0;
  color: #ffffff;
}

/* Description */
.cd-card-description {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  letter-spacing: 0%;
  color: #475569;
  margin: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Info Row */
.cd-card-info {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.cd-card-info-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
  font-size: 12px;
  line-height: 16px;
  font-weight: 400;
  color: var(--cd-text-subtle);
  text-decoration: none;
  white-space: normal;
}

.cd-card-info-item svg {
  display: block;
  flex-shrink: 0;
}

.cd-card-website {
  transition: color var(--cd-transition);
}

.cd-card-website:hover {
  color: var(--cd-primary);
}

/* Tags */
.cd-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.cd-tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 10px;
  background: #f5f5f5;
  border-radius: var(--cd-radius-sm);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  color: var(--cd-text);
  white-space: nowrap;
}

/* ---- Empty State ---- */
.cd-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  gap: 16px;
}

.cd-empty[hidden] {
  display: none;
}

.cd-empty svg {
  display: block;
}

.cd-empty-title {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
  font-size: 18px;
  line-height: 28px;
  font-weight: 600;
  color: var(--cd-text);
  margin: 0;
}

.cd-empty-subtitle {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
  color: var(--cd-text-muted);
  margin: 0;
}

/* ---- Drawer Overlay ---- */
.cd-drawer-overlay {
  position: fixed;
  inset: 0;
  background: #000000b2;
  z-index: 1040;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--cd-transition);
}

.cd-drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* ---- Drawer ---- */
.cd-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 563px;
  max-width: 100vw;
  background: var(--cd-white);
  box-shadow: var(--cd-shadow-drawer);
  z-index: 1050;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cd-drawer[hidden] {
  display: flex;
}

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

.cd-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px;
  flex-shrink: 0;
}

.cd-drawer-title {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
  font-size: 24px;
  font-weight: 600;
  line-height: 100%;
  color: var(--cd-text);
  margin: 0;
}

.cd-drawer-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: none;
  border: none;
  border-radius: var(--cd-radius-sm);
  cursor: pointer;
  color: var(--cd-text-muted);
  transition:
    background var(--cd-transition),
    color var(--cd-transition);
  padding: 0;
}

.cd-drawer-close:hover {
  background: #f1f5f9;
  color: var(--cd-text);
}

.cd-drawer-close:focus {
  background: none;
  color: var(--cd-text);
}

.cd-drawer-close svg {
  display: block;
}

.cd-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding-left: 32px;
  padding-right: 32px;
  padding-bottom: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.cd-drawer-body::-webkit-scrollbar {
  width: 4px;
}
.cd-drawer-body::-webkit-scrollbar-track {
  background: transparent;
}
.cd-drawer-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.cd-drawer-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cd-drawer-label {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
  font-size: 18px;
  line-height: 100%;
  letter-spacing: -2%;
  font-weight: 600;
  color: var(--cd-text);
  margin: 0;
}

/* Date Range */
.cd-date-range {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cd-date-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  height: 40px;
  border: 1px solid var(--cd-border);
  border-radius: var(--cd-radius-sm);
  background: var(--cd-white);
  box-sizing: border-box;
  transition: border-color var(--cd-transition);
}

.cd-date-field:focus-within {
  border-color: var(--cd-primary);
}

.cd-date-field svg {
  display: block;
  flex-shrink: 0;
}

.cd-date-input {
  flex: 1;
  border: none;
  outline: none;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
  font-size: 14px;
  color: var(--cd-text);
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  min-width: 0;
}

.cd-date-field--clickable {
  cursor: pointer;
  position: relative;
}

.cd-date-label {
  flex: 1;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
  font-size: 15px;
  font-weight: 400;
  line-height: 100%;
  color: #0a0a0a;
}

.cd-date-label.has-value {
  color: #0a0a0a;
}

.cd-date-input--hidden {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* Tags Filter */
.cd-tags-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.cd-tag-filter-btn {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 4px;
  background: var(--cd-white);
  border: 1px solid var(--cd-border);
  border-radius: 4px;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
  font-size: 12px;
  font-weight: 600;
  color: var(--cd-text-muted);
  cursor: pointer;
  transition:
    background var(--cd-transition),
    border-color var(--cd-transition),
    color var(--cd-transition);
}

.cd-tag-filter-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: var(--cd-text);
}

.cd-tag-filter-btn.active {
  background: #017cba;
  border-color: #017cba;
  color: var(--cd-white);
}

/* Drawer Footer */
.cd-drawer-footer {
  display: flex;
  align-items: center;
  gap: 11px;
  padding-top: 24px;
  padding-bottom: 24px;
  margin-left: 32px;
  margin-right: 32px;
  border-top: 1px solid var(--cd-border);
  flex-shrink: 0;
}

.cd-drawer-clear {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 40px;
  background: var(--cd-white);
  border: 1px solid var(--cd-border);
  border-radius: var(--cd-radius-md);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
  font-size: 15px;
  font-weight: 600;
  color: #0a0a0a;
  cursor: pointer;
  transition:
    background var(--cd-transition),
    border-color var(--cd-transition),
    color var(--cd-transition);
}

.cd-drawer-clear:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: var(--cd-text);
}

.cd-drawer-clear:active {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: var(--cd-text);
}

.cd-drawer-clear svg {
  display: block;
}

.cd-drawer-apply {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  background: #017cba;
  border: none;
  border-radius: var(--cd-radius-md);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
  font-size: 15px;
  font-weight: 600;
  color: var(--cd-white);
  cursor: pointer;
  transition: background var(--cd-transition);
}

.cd-drawer-apply:hover {
  background: var(--cd-primary-dark);
}

.cd-drawer-apply:active {
  background: var(--cd-primary-dark);
}

/* =========================================================
   CUSTOM DROPDOWN
   ========================================================= */
.gft-custom-select {
  position: relative;
  width: 100%;
}

.gft-custom-select-trigger {
  width: 100%;
  padding: 8px 13px 8px 13px;
  border: 1px solid var(--cd-border);
  border-radius: var(--cd-radius-sm);
  font-size: 15px;
  line-height: 100%;
  font-weight: 400;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
  color: #0a0a0a;
  background: var(--cd-white);
  outline: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-align: left;
  transition:
    border-color var(--cd-transition),
    background var(--cd-transition);
  user-select: none;
  -webkit-user-select: none;
  box-sizing: border-box;
}

.gft-custom-select-trigger:hover {
  border-color: #cbd5e1;
  background: var(--gft-white);
}

.gft-custom-select-trigger:active {
  border-color: #cbd5e1;
  background: var(--gft-white);
}

.gft-custom-select-trigger.open {
  border-color: var(--cd-primary);
  background: var(--gft-white);
  border-radius: var(--cd-radius-sm) var(--cd-radius-sm) 0 0;
}

.gft-select-value {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--cd-text);
}

.gft-select-value.placeholder {
  color: var(--cd-text-subtle);
}

.gft-select-chevron {
  flex-shrink: 0;
  transition: transform var(--cd-transition);
  color: var(--cd-text-subtle);
  display: block;
}

.gft-select-chevron svg {
  display: block;
}

.gft-custom-select-trigger.open .gft-select-chevron {
  transform: rotate(180deg);
  color: var(--cd-primary);
}

.gft-custom-select-dropdown {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  background: var(--cd-white);
  border: 1px solid var(--cd-border);
  border-top: none;
  border-radius: var(--cd-radius-sm);
  z-index: 1000;
  overflow: hidden;
  display: none;
  max-height: 280px;
  flex-direction: column;
  box-shadow: 0px 5px 15px 0px #10182833;
}

.gft-custom-select-dropdown.open {
  display: flex;
}

.gft-dropdown-options {
  overflow-y: auto;
  flex: 1;
  padding: 4px 0;
}

.gft-dropdown-options::-webkit-scrollbar {
  width: 4px;
}
.gft-dropdown-options::-webkit-scrollbar-track {
  background: transparent;
}
.gft-dropdown-options::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.gft-dropdown-option {
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 400;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
  color: #0a0a0a;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: background 0.1s ease;
  line-height: 100%;
}

.gft-dropdown-option:hover {
  background: #f8fafc;
}

.gft-dropdown-option.selected {
  color: var(--cd-text);
  font-weight: 500;
}

.gft-option-check {
  color: #1a1a1a;
  flex-shrink: 0;
  display: none;
}

.gft-option-check svg {
  display: block;
}

.gft-dropdown-option.selected .gft-option-check {
  display: block;
}

/* =========================================================
   CHECKBOXES
   ========================================================= */
.gft-checkbox-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px 20px;
  padding: 0px;
}

.gft-checkbox-grid::-webkit-scrollbar {
  width: 4px;
}
.gft-checkbox-grid::-webkit-scrollbar-track {
  background: transparent;
}
.gft-checkbox-grid::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
.gft-checkbox-grid::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.gft-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: var(--cd-text);
  cursor: pointer;
  line-height: 100%;
  padding: 2px 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
}

.gft-checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  appearance: none;
  -webkit-appearance: none;
  background: #fafbfd;
  border: 1px solid #d8d8d8;
  border-radius: 5px;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  margin: 0;
}

.gft-checkbox-label input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 9px;
  height: 9px;
  transform: translate(-50%, -50%) scale(0);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 9'%3E%3Cpath d='M0.75 4.5L3.75 7.5L8.25 0.75' fill='white' stroke='%230284C7' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  opacity: 1;
  transition: transform 0.15s ease;
}

.gft-checkbox-label input[type="checkbox"]:checked {
  border-color: #0284c7;
}

.gft-checkbox-label input[type="checkbox"]:checked::after {
  transform: translate(-50%, -50%) scale(1);
}

.gft-checkbox-label input[type="checkbox"]:focus-visible {
  outline: 2px solid rgba(2, 132, 199, 0.35);
  outline-offset: 3px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 768px) {
  .cd-wrap {
    padding: 20px 16px;
  }

  .cd-filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .cd-category-select {
    flex: 1 1 auto;
    width: 100%;
  }

  .cd-drawer {
    width: 100%;
  }
}

/* ---- Pagination ---- */
.cd-pagination {
  display: flex;
  align-items: center;
  justify-content: center; /* ← centres it */
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 40px;
  padding-bottom: 16px;
}

.cd-pagination__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  background: #ffffff;
  border: 1px solid var(--cd-border);
  border-radius: var(--cd-radius-sm);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
  font-size: 14px;
  font-weight: 500;
  color: var(--cd-text-muted);
  cursor: pointer;
  transition:
    background var(--cd-transition),
    border-color var(--cd-transition),
    color var(--cd-transition);
  gap: 4px;
}

.cd-pagination__item:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: var(--cd-text);
}

.cd-pagination__item:focus {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: var(--cd-text);
}

/* ← Blue active page */
.cd-pagination__item--active {
  background: #017cba;
  border-color: #017cba;
  color: #ffffff;
  pointer-events: none;
}

.cd-pagination__ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
  font-size: 14px;
  color: var(--cd-text-subtle);
  user-select: none;
}

.cd-pagination__prev,
.cd-pagination__next {
  padding: 0 14px;
}

/* ---- Loading state (fade-in pattern) ---- */
.cd-is-loading #cdGrid {
  opacity: 0.4;
  pointer-events: none;
  transition: opacity 0.15s ease;
}
.cd-is-loading #cdPagination {
  opacity: 0.4;
  pointer-events: none;
  transition: opacity 0.15s ease;
}
.cd-wrap {
  position: relative;
}
.cd-wrap::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 50%, #3b82f6 100%);
  background-size: 200% 100%;
  border-radius: 2px;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
  z-index: 5;
  animation: cd-progress-shimmer 1.2s infinite linear;
}
.cd-is-loading::before {
  opacity: 1;
}
@keyframes cd-progress-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}
