/**
 * Categories Nav - Kullanıcı dostu, eşsiz header kategoriler çubuğu
 * Sadece .header-categories içindeki nav için geçerli
 */

/* Çubuk konteyner */
.header-categories {
  background: linear-gradient(180deg,
    rgba(28, 32, 48, 0.98) 0%,
    rgba(24, 28, 42, 0.98) 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 12px 0;
  position: relative;
  z-index: 999;
  overflow: hidden;
}

.header-categories::before,
.header-categories::after {
  display: none;
}

.header-categories > .container {
  position: relative;
  z-index: 1;
}

/* Kaydırma ipucu: kenarlarda hafif solukluk */
.header-categories .categories-nav {
  display: flex !important;
  align-items: stretch;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(59, 130, 246, 0.4) transparent;
  -ms-overflow-style: none;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  visibility: visible !important;
  opacity: 1 !important;
  min-height: 44px;
}

.header-categories .categories-nav::-webkit-scrollbar {
  height: 6px;
}

.header-categories .categories-nav::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 3px;
}

.header-categories .categories-nav::-webkit-scrollbar-thumb {
  background: rgba(59, 130, 246, 0.35);
  border-radius: 3px;
}

.header-categories .categories-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(59, 130, 246, 0.5);
}

/* Tüm linkler: chip tarzı, dokunma alanı rahat */
.header-categories .category-link {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: none;
  flex-shrink: 0;
  min-height: 40px;
  scroll-snap-align: start;
  visibility: visible !important;
  opacity: 1 !important;
}

.header-categories .category-link span {
  color: inherit;
}

.header-categories .category-link:hover {
  color: var(--primary-blue);
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.header-categories .category-link i {
  font-size: 14px;
  opacity: 0.9;
}

/* Kategoriler ana butonu - net hiyerarşi */
.header-categories .category-link-primary,
.header-categories .category-link:first-child {
  background: linear-gradient(135deg,
    rgba(30, 64, 175, 0.9) 0%,
    rgba(59, 130, 246, 0.85) 100%) !important;
  color: #fff !important;
  font-weight: 600 !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 2px 10px rgba(30, 64, 175, 0.35) !important;
  padding: 10px 18px !important;
  font-size: 13px !important;
}

.header-categories .category-link-primary::before,
.header-categories .category-link:first-child::before {
  display: none;
}

.header-categories .category-link-primary:hover,
.header-categories .category-link:first-child:hover {
  background: linear-gradient(135deg,
    rgba(37, 99, 235, 0.95) 0%,
    rgba(96, 165, 250, 0.9) 100%) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(30, 64, 175, 0.4) !important;
}

/* Kategori ikonları */
.header-categories .category-icon {
  width: 24px;
  height: 24px;
  object-fit: cover;
  border-radius: 8px;
  filter: brightness(0.95);
  transition: filter 0.2s ease, transform 0.2s ease;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.header-categories .category-link:hover .category-icon {
  filter: brightness(1.1);
  transform: scale(1.05);
}

/* İlan Ekle - belirgin CTA */
.header-categories .category-link-highlight {
  background: linear-gradient(135deg,
    rgba(34, 197, 94, 0.9) 0%,
    rgba(22, 163, 74, 0.9) 100%) !important;
  color: #fff !important;
  font-weight: 600 !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  box-shadow: 0 2px 12px rgba(34, 197, 94, 0.3) !important;
  padding: 10px 18px !important;
  margin-left: 4px;
}

.header-categories .category-link-highlight:hover {
  background: linear-gradient(135deg,
    rgba(34, 197, 94, 1) 0%,
    rgba(22, 163, 74, 1) 100%) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4) !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
}

/* Tablet / küçük ekran */
@media (max-width: 1024px) {
  .header-categories .categories-nav {
    gap: 8px;
    padding: 4px 4px;
  }

  .header-categories .category-link {
    padding: 9px 14px;
    font-size: 12px;
    min-height: 38px;
  }

  .header-categories .category-link-primary,
  .header-categories .category-link:first-child {
    padding: 9px 16px !important;
    font-size: 12px !important;
  }

  .header-categories .category-link-highlight {
    padding: 9px 14px !important;
  }

  .header-categories .category-icon {
    width: 22px;
    height: 22px;
  }
}
