/* Marketplace Page Styles */
@import url('dev-card.css');

/* Marketplace Section */
.marketplace-section {
  width: 100%;
  max-width: 860px;
  margin-top: 8px;
  margin-bottom: 24px;
}

/* Controls Container (Filter Nav + Search) */
.marketplace-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

/* Category Filter Navigation */
.marketplace-filter-nav {
  display: flex;
  gap: 8px;
  padding: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex-shrink: 0;
}

.marketplace-filter-nav::-webkit-scrollbar {
  display: none;
}

.marketplace-filter-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.4);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.marketplace-filter-btn svg {
  width: 14px;
  height: 14px;
}

.marketplace-filter-btn:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
}

.marketplace-filter-btn.active {
  color: var(--accent-text);
  background-color: var(--accent-color);
  border-color: var(--accent-color);
}

/* Search Bar */
.marketplace-search {
  position: relative;
  flex-shrink: 0;
  width: 220px;
}

.marketplace-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.4);
  pointer-events: none;
  transition: color 0.2s ease;
}

.marketplace-search-input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #ffffff;
  background-color: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  outline: none;
  transition: all 0.2s ease;
}

.marketplace-search-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.marketplace-search-input:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.marketplace-search-input:focus {
  border-color: var(--accent-color);
  background-color: rgba(255, 255, 255, 0.02);
}

.marketplace-search-input:focus + .marketplace-search-icon,
.marketplace-search:focus-within .marketplace-search-icon {
  color: var(--accent-color);
}

/* Mobile Search Bar - Hidden by default */
.marketplace-search-mobile {
  display: none;
}

/* Mobile Controls Container - Hidden by default */
.marketplace-mobile-controls {
  display: none;
}

/* Mobile Filter Dropdown - Hidden by default */
.filter-dropdown {
  display: none;
  position: relative;
  margin-bottom: 24px;
}

.filter-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #ffffff;
  background-color: #0e0e0e;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-dropdown-trigger:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.filter-dropdown-trigger.open {
  border-color: var(--accent-color);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.filter-dropdown-trigger .dropdown-icon {
  width: 18px;
  height: 18px;
  color: var(--accent-color);
}

.filter-dropdown-trigger .dropdown-text {
  flex: 1;
  text-align: left;
}

.filter-dropdown-trigger .dropdown-chevron {
  width: 16px;
  height: 16px;
  color: #ffffff60;
  transition: transform 0.2s ease;
}

.filter-dropdown-trigger.open .dropdown-chevron {
  transform: rotate(180deg);
}

.filter-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: #0e0e0e;
  border: 1px solid var(--accent-color);
  border-top: none;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 100;
}

.filter-dropdown-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.filter-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #ffffff80;
  text-align: left;
  background: none;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-dropdown-item:last-child {
  border-bottom: none;
}

.filter-dropdown-item svg {
  width: 18px;
  height: 18px;
}


.filter-dropdown-item.active {
  color: var(--accent-color);
  background-color: var(--accent-15);
}

.filter-dropdown-item.active svg {
  color: var(--accent-color);
}

/* Developers Grid */
.developers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* Fade in animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Large screens - 4 columns (default) */
/* Tablet breakpoint */
@media (max-width: 1919px) {
  .marketplace-section {
    max-width: calc(100% - 40px);
  }
}

/* Wrap controls early - before tabs get cut off */
@media (max-width: 1400px) {
  .marketplace-controls {
    flex-wrap: wrap;
  }

  .marketplace-filter-nav {
    width: 100%;
    order: 1;
  }

  .marketplace-search {
    width: 100%;
    order: 2;
  }
}


/* Medium-large screens - 3 columns */
@media (max-width: 1400px) {
  .developers-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

/* Tablet - 2 columns */
@media (max-width: 1050px) {
  .developers-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .main-content {
    padding-top: 62px;
  }

  .marketplace-section {
    max-width: 100%;
    margin-top: 8px;
  }

  /* Hide desktop controls, show mobile controls */
  .marketplace-controls {
    display: none;
  }

  .marketplace-mobile-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
  }

  .marketplace-mobile-controls .filter-dropdown {
    display: block;
    margin-bottom: 0;
  }

  .marketplace-search-mobile {
    display: block;
    width: 100%;
  }

  .developers-grid {
    gap: 12px;
  }
}

/* Small mobile - 1 column */
@media (max-width: 540px) {
  .developers-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}
