/* ==========================================================================
   categories.css — Kategoriler + Kategori-Detay
   ========================================================================== */

:root {
  --c-primary: #4f46e5;
  --c-primary-dark: #4338ca;
  --c-primary-light: #eef2ff;
  --c-text-dark: #111827;
  --c-text-body: #4b5563;
  --c-text-muted: #9ca3af;
  --c-text-light: #d1d5db;
  --c-border: #e5e7eb;
  --c-radius: 12px;
  --c-transition: 0.2s ease;
}

/* ==========================================================================
   OVERFLOW FIX — çift scrollbar sorunu
   ========================================================================== */
body.page-kategori-detay,
body.page-kategoriler { overflow-x: hidden; }
body.page-kategori-detay .wrapper.ovh,
body.page-kategoriler .wrapper.ovh { overflow: visible !important; }
body.page-kategori-detay .body_content,
body.page-kategoriler .body_content { min-height: auto !important; }
body.page-kategori-detay .body_content section,
body.page-kategoriler .body_content section { padding-top: 0 !important; padding-bottom: 0 !important; }
body.page-kategori-detay .body_content section.footer-style1,
body.page-kategoriler .body_content section.footer-style1 { padding-top: 60px !important; }

/* ==========================================================================
   BREADCRUMB
   ========================================================================== */
.page-kategori-detay .breadcumb-section {
  background: transparent;
  padding: 16px 0 0;
}
.page-kategori-detay .breadcumb-list {
  display: flex; align-items: center; gap: 6px; font-size: 13px;
}
.page-kategori-detay .breadcumb-list a {
  color: var(--c-text-muted); text-decoration: none; transition: color var(--c-transition);
}
.page-kategori-detay .breadcumb-list a:hover { color: var(--c-primary); }
.page-kategori-detay .breadcumb-list a:not(:last-child)::after {
  content: "/"; margin-left: 6px; color: var(--c-text-light);
}
.page-kategori-detay .breadcumb-list a:last-child {
  color: var(--c-text-dark); font-weight: 500; pointer-events: none;
}

/* ==========================================================================
   PAGE CONTAINER
   ========================================================================== */
.cd-page {
  padding: 0 0 60px;
  background: #fff;
}

/* ==========================================================================
   HERO — basit, kompakt
   ========================================================================== */
.cd-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0 20px;
  border-bottom: 1px solid var(--c-border);
  margin-bottom: 20px;
}
.cd-hero-left h1 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--c-text-dark);
  margin: 0 0 4px;
  letter-spacing: -0.02em;
}
.cd-hero-left p {
  font-size: 14px;
  color: var(--c-text-muted);
  margin: 0;
}
.cd-hero-right { flex-shrink: 0; }
.cd-hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: #000000;
  color: #ffffff;
  border: 1px solid #000000;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background .2s, color .2s, border-color .2s;
}
.cd-hero-btn:hover {
  background: #ffffff;
  color: #000000;
  border-color: #000000;
  text-decoration: none;
}
.cd-hero-btn i { font-size: 11px; color: inherit; }

/* ==========================================================================
   CONTROLS — stats + search yan yana
   ========================================================================== */
.cd-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.cd-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.cd-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #000000;
  background: #f4f6fb;
  padding: 7px 14px;
  border-radius: 8px;
  border: none;
}
.cd-stat i { font-size: 11px; color: #000000; }
.cd-stat-link {
  text-decoration: none;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.cd-stat-link:hover {
  background: #000000;
  color: #ffffff;
}
.cd-stat-link:hover i { color: #ffffff; }

.cd-search-box {
  position: relative;
  flex-shrink: 0;
  width: 200px;
}
.cd-search-box .cd-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--c-text-light);
  font-size: 13px;
  pointer-events: none;
}
.cd-search-input {
  width: 100%;
  height: 36px;
  padding: 0 12px 0 34px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  background: #fff;
  color: var(--c-text-dark);
  outline: none;
  transition: border-color var(--c-transition);
}
.cd-search-input:focus { border-color: var(--c-primary); }
.cd-search-input::placeholder { color: var(--c-text-light); }

/* ==========================================================================
   NO MATCH
   ========================================================================== */
.cd-no-match {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px 20px;
  color: var(--c-text-muted);
  font-size: 14px;
}
.cd-no-match i { font-size: 16px; color: var(--c-text-light); }

/* ==========================================================================
   CARD GRID — CSS Grid, kompakt
   ========================================================================== */
.cd-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.cd-card-col { min-width: 0; }

.cd-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 20px;
  background: #fff;
  border: none;
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
  transition: box-shadow .25s ease, transform .25s ease;
}
.cd-card:hover {
  color: inherit;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

/* Card Top — icon + title */
.cd-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.cd-card-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 10px;
  background: #f4f6fb;
  color: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all var(--c-transition);
}
.cd-card:hover .cd-card-icon {
  background: var(--c-primary);
  color: #ffffff;
  transform: rotate(-6deg) scale(1.05);
}
.cd-card-title { flex: 1; min-width: 0; }
.cd-card-title h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--c-text-dark);
  margin: 0;
  line-height: 1.3;
  transition: color var(--c-transition);
}
.cd-card:hover .cd-card-title h3 { color: var(--c-primary); }
.cd-card-count {
  font-size: 12px;
  color: var(--c-text-muted);
  font-weight: 500;
}

/* Card Tags — alt kategoriler (liste formatı) */
.cd-card-tags {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--c-border);
}
.cd-card-tags-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  font-size: 12.5px;
  color: var(--c-text-body);
  line-height: 1.7;
}
.cd-tag {
  display: inline;
  font-weight: 500;
  color: var(--c-text-body);
  cursor: pointer;
  transition: color var(--c-transition);
  white-space: nowrap;
}
.cd-tag:hover {
  color: var(--c-primary);
}
.cd-tag-sep {
  color: var(--c-text-light);
  margin: 0 6px;
  font-size: 10px;
  user-select: none;
}
.cd-tag-more {
  display: inline;
  font-weight: 600;
  color: var(--c-primary);
  font-size: 12px;
  cursor: pointer;
  margin-left: 4px;
}

/* Card CTA */
.cd-card-cta {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-primary);
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--c-border);
}
.cd-card-cta i {
  font-size: 11px;
  margin-left: 4px;
  transition: transform var(--c-transition);
}
.cd-card:hover .cd-card-cta i { transform: translateX(3px); }

/* Empty */
.cd-empty {
  text-align: center;
  padding: 60px 20px;
}
.cd-empty i { font-size: 2rem; color: var(--c-text-light); margin-bottom: 16px; display: block; }
.cd-empty p { color: var(--c-text-muted); font-size: 14px; margin: 0; }
.cd-empty a { color: var(--c-primary); font-weight: 600; }

/* ==========================================================================
   KATEGORİLER SAYFASI (category.php) — breadcrumb
   ========================================================================== */
.page-kategoriler .breadcumb-section {
  background: transparent; padding: 16px 0 0;
}
.page-kategoriler .breadcumb-list {
  display: flex; align-items: center; gap: 6px; font-size: 13px;
}
.page-kategoriler .breadcumb-list a {
  color: var(--c-text-muted); text-decoration: none; transition: color var(--c-transition);
}
.page-kategoriler .breadcumb-list a:hover { color: var(--c-primary); }
.page-kategoriler .breadcumb-list a:not(:last-child)::after {
  content: "/"; margin-left: 6px; color: var(--c-text-light);
}
.page-kategoriler .breadcumb-list a:last-child {
  color: var(--c-text-dark); font-weight: 500; pointer-events: none;
}

/* Icon image inside cd-card-icon */
.cd-card-icon img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  transition: filter var(--c-transition);
}
.cd-card:hover .cd-card-icon img {
  filter: brightness(0) invert(1);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1199px) {
  .cd-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 991px) {
  .cd-grid { grid-template-columns: repeat(2, 1fr); }
  .cd-hero { flex-direction: column; align-items: flex-start; gap: 16px; }
  .cd-controls { flex-direction: column; align-items: flex-start; }
  .cd-search-box { width: 100%; }
  .cat-page-header h1 { font-size: 1.4rem; }
}
@media (max-width: 767px) {
  .cd-grid { grid-template-columns: 1fr; gap: 12px; }
  .cd-hero { padding: 16px 0 14px; margin-bottom: 14px; }
  .cd-hero-left h1 { font-size: 1.2rem; }
  .cd-hero-left p { font-size: 13px; }
  .cd-hero-btn { padding: 9px 16px; font-size: 13px; width: 100%; justify-content: center; }
  .cd-controls { gap: 10px; margin-bottom: 14px; }
  .cd-stats { gap: 6px; }
  .cd-stat { font-size: 12px; padding: 4px 10px; }
  .cd-card { padding: 16px; }
  .cd-card-icon { width: 36px; height: 36px; min-width: 36px; font-size: 14px; }
  .cd-card-title h3 { font-size: 13px; }
  .cd-tag { font-size: 11px; padding: 3px 8px; }
  .cat-page-header h1 { font-size: 1.3rem; }
  .cat-card { padding: 18px; }
  .cat-card-header { gap: 12px; margin-bottom: 12px; }
  .cat-icon-wrap { width: 38px; height: 38px; min-width: 38px; font-size: 16px; }
  .cat-sub-link { font-size: 12px; }
  .cat-filter-wrap { margin: 16px auto 20px; }
}
