/* ==========================================================================
   SYSTEMAX — Ürün Katalogu spesifik stiller
   ========================================================================== */

.catalog {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  align-items: start;
}

.catalog-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 16px);
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 20px;
  max-height: calc(100vh - var(--nav-h) - 32px);
  overflow-y: auto;
}
.catalog-sidebar h4 {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-text-muted);
  margin: 0 0 12px;
}
.catalog-sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}
.catalog-sidebar ul li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  cursor: pointer;
  font-size: 0.92rem;
  color: var(--c-text);
  transition: background var(--transition);
}
.catalog-sidebar ul li:hover { background: var(--c-bg-soft); }
.catalog-sidebar ul li.is-active {
  background: var(--c-primary);
  color: #fff;
  font-weight: 600;
}
.catalog-sidebar ul li.is-active .count {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}
.catalog-sidebar .count {
  background: var(--c-bg-soft);
  color: var(--c-text-muted);
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
}

.catalog-main {
  min-height: 60vh;
}

.catalog-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--c-border);
}
.catalog-search {
  flex: 1;
  position: relative;
}
.catalog-search input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-md);
  font: inherit;
  background: #fff;
}
.catalog-search input:focus {
  outline: none;
  border-color: var(--c-primary);
}
.catalog-search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--c-text-muted);
  width: 18px;
  height: 18px;
  pointer-events: none;
}
.catalog-count {
  font-size: 0.9rem;
  color: var(--c-text-soft);
  white-space: nowrap;
}
.catalog-count strong { color: var(--c-text); }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}
.product-card {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-3px);
  border-color: var(--c-primary);
  box-shadow: var(--shadow-md);
}
.product-thumb {
  aspect-ratio: 1;
  background: var(--c-bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-thumb .placeholder {
  color: var(--c-primary);
  opacity: 0.25;
}
.product-thumb .placeholder svg { width: 64px; height: 64px; }
.product-thumb .badge {
  position: absolute;
  top: 10px; left: 10px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.product-thumb .badge--ok { background: var(--c-success); color: #fff; }
.product-thumb .badge--out { background: #DC2626; color: #fff; }
.product-thumb .badge--hb { background: #FF6000; color: #fff; }

a.product-card { color: inherit; text-decoration: none; }
a.product-card:hover .product-action { color: var(--c-primary-dark); }
.product-card .product-action::after { content: ' →'; }

.product-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.product-cat {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-primary);
  margin-bottom: 4px;
}
.product-name {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--c-text);
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-sku {
  font-size: 0.78rem;
  color: var(--c-text-muted);
  font-family: 'SF Mono', 'Consolas', monospace;
  margin-bottom: 12px;
}
.product-foot {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--c-border);
}
.product-price {
  font-weight: 700;
  color: var(--c-text);
  font-size: 1rem;
}
.product-price small { color: var(--c-text-muted); font-weight: 500; font-size: 0.78rem; }
.product-action {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--c-primary);
}

.catalog-empty {
  text-align: center;
  padding: 64px 24px;
  color: var(--c-text-soft);
}
.catalog-empty svg { width: 64px; height: 64px; margin-bottom: 16px; opacity: 0.3; }

@media (max-width: 880px) {
  .catalog { grid-template-columns: 1fr; }
  .catalog-sidebar {
    position: static;
    max-height: none;
  }
  .catalog-sidebar ul {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 0;
  }
}
