* { box-sizing: border-box; }
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f1f5f9;
  margin: 0;
  padding: 0;
  color: #1e293b;
}

/* Header & Nav */
header {
  background: #0f172a;
  color: #fff;
  padding: 20px;
  text-align: center;
}
header h1 { margin: 0 0 10px 0; font-size: 1.6rem; color: #38bdf8; }

nav {
  background: #1e293b;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}
.nav-link {
  text-decoration: none;
  background: transparent;
  border: 1px solid #334155;
  color: #94a3b8;
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.2s;
}
.nav-link:hover { background: #334155; color: #fff; }
.nav-link.active { background: #0284c7; color: #fff; border-color: #0284c7; }

/* Main Layout */
main {
  max-width: 1100px;
  margin: 25px auto;
  padding: 0 15px;
}
.page-title {
  font-size: 1.3rem;
  color: #0f172a;
  margin-bottom: 20px;
  border-bottom: 2px solid #0284c7;
  padding-bottom: 8px;
}

/* Category Grid Hub (Index) */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.cat-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 20px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.cat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
  border-color: #38bdf8;
}
.cat-card h3 { margin: 0 0 10px 0; color: #0284c7; font-size: 1.1rem; }
.cat-card p { margin: 0; font-size: 0.88rem; color: #64748b; line-height: 1.4; }

/* Item Cards (Pentru paginile de categorie) */
.catalog-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.item-card {
  display: flex;
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  padding: 18px;
  gap: 20px;
  align-items: flex-start;
}
.item-img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 6px;
  flex-shrink: 0;
}
.item-body { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.item-title { margin: 0; font-size: 1.15rem; color: #0369a1; }
.item-desc { margin: 0; font-size: 0.92rem; color: #475569; line-height: 1.4; }
.item-spec {
  background: #f1f5f9;
  padding: 8px 12px;
  border-radius: 6px;
  border-left: 4px solid #0284c7;
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pin-badge {
  background: #e0f2fe;
  color: #0369a1;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-weight: bold;
}

@media (max-width: 650px) {
  .item-card { flex-direction: column; align-items: center; }
  .item-img { width: 100%; max-width: 160px; height: auto; }
  nav { justify-content: flex-start; overflow-x: auto; white-space: nowrap; }
}