/* ==========================================================================
   Apex Bio — Peptit Kataloğu & Kategori Stilleri (Açık Tonlar / Light Theme)
   Kullanıcı isteği: Açık tonlu zemin, beyaz kartlar, ferah ve modern tasarım.
   ========================================================================== */

.kat {
  padding: 32px 0 80px;
  background: #F8FAFC;
  color: #0F172A;
  min-height: 80vh;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Breadcrumbs (Ekmek Kırıntıları) */
.k-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 20px;
  font: 400 0.85rem/1.2 var(--fb);
  color: #64748B;
}

.k-crumbs a {
  color: #64748B;
  text-decoration: none;
  transition: color 0.15s ease;
}

.k-crumbs a:hover {
  color: #0284C7;
}

.k-crumbs b {
  font-weight: 600;
  color: #0F172A;
}

/* Sayfa Başlığı ve Açıklaması */
.k-top {
  display: grid;
  gap: 10px;
  max-width: 860px;
  margin: 0 0 28px;
}

.category-page .k-top {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
  max-width: 100%;
  margin: 0 0 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid #E2E8F0;
}

.category-page .k-top-left {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.k-top h1 {
  font-size: clamp(1.8rem, 3.2vw, 2.8rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0F172A;
  margin: 0;
  font-family: var(--fd, "Tenor Sans", serif);
  font-weight: 400;
}

.category-page .k-top h1 {
  font-size: clamp(1.6rem, 2.4vw, 2.2rem);
  line-height: 1.18;
}

.category-page .k-top-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #F1F5F9;
  color: #475569;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  width: fit-content;
  border: 1px solid #E2E8F0;
}

.category-page .k-top-badge i {
  width: 6px;
  height: 6px;
  background: #0284C7;
  border-radius: 50%;
  display: inline-block;
}

.k-lead {
  color: #475569;
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
}

.k-desc-prose {
  display: grid;
  gap: 14px;
  max-width: 75ch;
  color: #475569;
  font-size: 0.98rem;
  line-height: 1.68;
  margin-top: 6px;
}

.category-page .k-desc-prose {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  max-width: 100%;
  color: #475569;
  font-size: 0.92rem;
  line-height: 1.62;
  margin: 0;
}

.k-desc-prose p {
  margin: 0;
}

/* Üst Görev Hap Butonları (Horizontal Task Scroller) */
.k-tasks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid #E2E8F0;
}

.k-tasks .k-task-btn {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid #E2E8F0;
  background: #FFFFFF;
  color: #475569;
  font: 500 0.75rem/1 var(--fb);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.18s ease;
}

.k-tasks .k-task-btn:hover {
  border-color: #0284C7;
  color: #0284C7;
  background: #F0F9FF;
}

.k-tasks .k-task-btn.active {
  background: #0284C7;
  border-color: #0284C7;
  color: #FFFFFF;
  font-weight: 600;
  box-shadow: 0 3px 10px rgba(2, 132, 199, 0.25);
}

/* Katalog Ana Gövdesi: Sol Filtre Paneli + Sağ Grid */
.k-body {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

/* Sol Filtre Paneli (Açık Ton) */
.k-panel {
  position: sticky;
  top: 90px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #CBD5E1 transparent;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 22px 20px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 18px;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
}

.k-facet-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.k-facet-title {
  margin: 0;
  font: 700 0.72rem/1 var(--fb);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #0369A1;
}

.k-facet-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Hedef Kategori Linkleri */
.k-goal-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  color: #334155;
  font: 400 0.88rem/1.3 var(--fb);
  text-decoration: none;
  transition: all 0.15s ease;
}

.k-goal-link span {
  flex: 1;
}

.k-goal-link i {
  font-style: normal;
  font-size: 0.76rem;
  color: #94A3B8;
  font-variant-numeric: tabular-nums;
  margin-left: 8px;
}

.k-goal-link:hover {
  color: #0284C7;
  background: #F8FAFC;
}

.k-goal-link.active {
  background: #F0F9FF;
  color: #0284C7;
  font-weight: 600;
}

.k-goal-link.active i {
  color: #0284C7;
  font-weight: 600;
}

/* Form Çeşitleri Checkbox'ları */
.k-checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  color: #334155;
  font: 400 0.88rem/1.3 var(--fb);
  user-select: none;
  transition: background 0.15s ease;
}

.k-checkbox-label:hover {
  background: #F8FAFC;
  color: #0F172A;
}

.k-checkbox-label input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.k-checkbox-custom {
  flex: none;
  width: 17px;
  height: 17px;
  border-radius: 4px;
  border: 1px solid #CBD5E1;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.k-checkbox-label input:checked + .k-checkbox-custom {
  background: #0284C7;
  border-color: #0284C7;
}

.k-checkbox-label input:checked + .k-checkbox-custom::after {
  content: "";
  width: 9px;
  height: 5px;
  border-left: 2px solid #FFFFFF;
  border-bottom: 2px solid #FFFFFF;
  transform: rotate(-45deg) translate(1px, -1px);
}

.k-checkbox-text {
  flex: 1;
}

.k-checkbox-label i {
  font-style: normal;
  font-size: 0.76rem;
  color: #94A3B8;
  font-variant-numeric: tabular-nums;
}

/* Filtre Sıfırla */
.k-reset-wrap {
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid #E2E8F0;
}

.k-reset-btn {
  display: block;
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #E2E8F0;
  background: #F8FAFC;
  color: #64748B;
  font: 500 0.8rem/1 var(--fb);
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}

.k-reset-btn:hover {
  border-color: #CBD5E1;
  color: #0F172A;
  background: #F1F5F9;
}

/* Sağ Ürün Grid Alanı */
.k-main {
  min-width: 0;
}

.k-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin: 0 0 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #E2E8F0;
}

.k-bar-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.k-count {
  margin: 0;
  color: #64748B;
  font-size: 0.95rem;
  font-weight: 400;
}

.k-count b {
  font-weight: 600;
  color: #0F172A;
}

.k-sort {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #64748B;
  font-size: 0.85rem;
}

.k-sort select {
  appearance: none;
  -webkit-appearance: none;
  height: 36px;
  padding: 0 32px 0 14px;
  border: 1px solid #CBD5E1;
  border-radius: 999px;
  background: #FFFFFF url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230284C7' stroke-width='2' stroke-linecap='round'><path d='m6 9 6 6 6-6'/></svg>") no-repeat right 12px center/12px;
  color: #0F172A;
  font: 500 0.82rem/1 var(--fb);
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.k-sort select:hover,
.k-sort select:focus {
  border-color: #0284C7;
  outline: none;
}

/* Ürün Grid'i (4 Sütun) */
.k-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

/* Ürün Kartı (Açık Ton, Lüks Beyaz Kart) */
.k-card {
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 3px 12px rgba(15, 23, 42, 0.04);
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.24s ease,
              box-shadow 0.24s ease;
}

.k-card:hover {
  transform: translateY(-4px);
  border-color: #38BDF8;
  box-shadow: 0 14px 30px rgba(2, 132, 199, 0.12);
}

/* 1. Molekül Başlığı (Kartın En Üstünde) */
.k-top-title {
  padding: 16px 16px 10px;
  margin: 0;
  text-align: center;
  font: 600 1.05rem/1.25 var(--fb);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.k-top-title a {
  color: #0F172A;
  text-decoration: none;
  transition: color 0.15s ease;
}

.k-top-title a:hover {
  color: #0284C7;
}

/* 2. Ürün Görsel Sahnesi */
.k-pic {
  display: block;
  position: relative;
  aspect-ratio: 3 / 4;
  margin: 0 14px;
  overflow: hidden;
  border-radius: 12px;
  background: #0B1220; /* Ürün şişesi fotoğraflarının stüdyo derinliği için zarif koyu pencere */
  background: radial-gradient(circle at 50% 45%, #172554 0%, #0B1220 85%);
  text-decoration: none;
}

.k-pic img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.2s ease, transform 0.35s ease;
}

.k-card:hover .k-pic img {
  transform: scale(1.04);
}

/* 3. Kart Bilgi Gövdesi */
.k-info {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 12px 14px 16px;
  text-align: center;
}

/* Kategori / Görev Etiketi */
.k-task {
  font: 600 0.68rem/1.2 var(--fb);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #0284C7;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 4. Form Seçici Hap Butonları (Chips) */
.k-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-content: flex-start;
  gap: 6px;
  margin-bottom: 10px;
  min-height: 56px;
}

.k-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid #E2E8F0;
  background: #F1F5F9;
  color: #334155;
  font: 500 0.72rem/1 var(--fb);
  letter-spacing: 0.02em;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  user-select: none;
}

.k-chip:hover {
  border-color: #BAE6FD;
  color: #0284C7;
  background: #E0F2FE;
}

.k-chip.on {
  background: #0284C7;
  border-color: #0284C7;
  color: #FFFFFF;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35);
  cursor: default;
}

/* 5. Aktif Formun Açıklama Satırı */
.k-spec {
  font: 400 0.8rem/1.2 var(--fb);
  color: #64748B;
  margin: 0 0 14px;
  min-height: 1.1em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 6. Kart Eylem Butonu (KESİNLİKLE FİYAT VE STOK YOK) */
.k-card-action {
  margin-top: auto;
}

.k-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 38px;
  border-radius: 999px;
  background: #0F172A;
  color: #FFFFFF;
  border: 1px solid #0F172A;
  font: 600 0.74rem/1 var(--fb);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.k-btn:hover {
  background: #0284C7;
  border-color: #0284C7;
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.3);
  transform: translateY(-1px);
}

/* Boş Durum (Empty State) */
.k-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 64px 20px;
  background: #FFFFFF;
  border: 1px dashed #CBD5E1;
  border-radius: 18px;
  color: #64748B;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.k-empty p {
  margin: 0;
  font-size: 1.05rem;
}

/* Mobil Filtre Açma Butonu (Masaüstünde Gizli, Mobilde Sıralamanın Yanında) */
.k-mob-filter-btn {
  display: none;
}

.k-panel-close {
  display: none;
}

/* Responsive Kırılımlar */
@media (max-width: 1200px) {
  .k-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .category-page .k-top {
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 0 0 24px;
    padding-bottom: 20px;
  }
}

@media (max-width: 900px) {
  .k-body {
    grid-template-columns: 1fr;
  }

  .k-panel {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(320px, 85vw);
    max-height: 100vh;
    z-index: 100;
    border-radius: 0;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.15);
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .k-panel.open {
    transform: translateX(0);
  }

  .k-panel-close {
    display: flex;
    justify-content: flex-end;
    margin-bottom: -10px;
  }

  .k-panel-close button {
    background: transparent;
    border: none;
    color: #0F172A;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px 8px;
  }

  .k-panel-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    z-index: 95;
  }

  .k-panel-backdrop.open {
    display: block;
  }

  .k-bar {
    gap: 12px;
    margin: 0 0 18px;
    padding-bottom: 14px;
  }

  .k-bar-controls {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .k-mob-filter-btn {
    display: inline-flex !important;
    position: static !important;
    bottom: auto !important;
    right: auto !important;
    z-index: auto !important;
    height: 36px;
    padding: 0 16px;
    border-radius: 999px;
    background: #0284C7;
    color: #FFFFFF;
    font: 600 0.8rem/1 var(--fb);
    letter-spacing: 0.04em;
    text-transform: none;
    border: 1px solid #0284C7;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.22);
    cursor: pointer;
    align-items: center;
    gap: 6px;
    transition: background 0.15s ease, transform 0.15s ease;
    flex: none;
  }

  .k-mob-filter-btn:hover {
    background: #0369A1;
    border-color: #0369A1;
  }

  .k-mob-filter-btn:active {
    transform: scale(0.96);
  }

  .k-mob-filter-btn svg {
    width: 15px;
    height: 15px;
  }

  .k-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
}

@media (max-width: 520px) {
  .k-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .k-bar-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
  }

  .k-mob-filter-btn {
    flex: 1 1 0;
    justify-content: center;
    height: 38px;
  }

  .k-sort {
    flex: 1 1 0;
    gap: 6px;
  }

  .k-sort label {
    display: none;
  }

  .k-sort select {
    width: 100%;
    height: 38px;
    font-size: 0.8rem;
    padding: 0 28px 0 12px;
  }

  .k-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .k-card {
    border-radius: 14px;
  }

  .k-pic {
    aspect-ratio: 3 / 4;
    max-height: none;
    margin: 0 4px;
    border-radius: 10px;
  }
}

/* Alt Çapraz Bağlantılar (Cross-links: Hedefe ve Forma Göre) */
.k-links {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid #E2E8F0;
}

.k-links h2 {
  font: 600 1.15rem/1.3 var(--fb);
  color: #0F172A;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}

.k-links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
}

.k-links li a {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 999px;
  color: #334155;
  font: 500 0.85rem/1.2 var(--fb);
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

.k-links li a:hover {
  background: #F0F9FF;
  border-color: #38BDF8;
  color: #0284C7;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.15);
}
