/* ── Background ── */
body {
  background: url("assets/animated-background-light-0.svg") fixed no-repeat;
  background-size: cover;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

/* ── Header ── */
.nn-header {
  background: #fff;
  border-bottom: 1px solid rgba(0,0,0,.08);
}
.nn-logo-img { width: 60px; }

/* ── Footer ── */
.nn-footer {
  border-top: 1px solid rgba(0,0,0,.08);
  background: #fff;
  padding: 20px 0;
}
.nn-footer .footer-link { color: rgba(0,0,0,.65); text-decoration: none; }
.nn-footer .footer-link:hover { color: #2d63ad; text-decoration: underline; }

/* ────────────────────────────────────────
   SEARCH BAR
──────────────────────────────────────── */

.search-wrap {
  position: relative;
}
.search-wrap .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(0,0,0,.35);
  pointer-events: none;
  z-index: 1;
}
.search-wrap input {
  padding-left: 42px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.12);
  height: 44px;
  font-size: 0.9rem;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(8px);
  width: 100%;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  transition: box-shadow 0.15s, border-color 0.15s, background 0.15s;
}
.search-wrap input:focus {
  box-shadow: 0 0 0 3px rgba(45,99,173,.12), 0 2px 8px rgba(0,0,0,.06);
  border-color: #2d63ad;
  outline: none;
  background: #fff;
}

/* ────────────────────────────────────────
   CATEGORY TAB SWITCHER
──────────────────────────────────────── */

.tool-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0,0,0,.1);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
}
.tab-btn {
  border: none;
  background: transparent;
  border-radius: 9px;
  padding: 8px 18px;
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(0,0,0,.55);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}
.tab-btn:hover { color: #2d63ad; }
.tab-btn.active {
  background: #fff;
  color: #2d63ad;
  box-shadow: 0 1px 4px rgba(0,0,0,.12);
}

/* ────────────────────────────────────────
   DEVICE CARD GRID
──────────────────────────────────────── */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

/* ── Device card ── */
.device-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.18s, transform 0.18s;
}
.device-card:hover {
  box-shadow: 0 8px 28px rgba(45,99,173,.13), 0 2px 8px rgba(0,0,0,.07);
  transform: translateY(-2px);
}

.device-card .card-img-wrap {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(0,0,0,.06);
  padding: 8px;
}
.device-card .card-img-wrap img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.25s ease;
}
.device-card:hover .card-img-wrap img {
  transform: scale(1.04);
}

.device-card .card-body {
  padding: 16px 18px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.device-card .card-brand {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #2d63ad;
  margin-bottom: 3px;
}

.device-card .card-model {
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 4px;
  line-height: 1.3;
}

.device-card .card-category-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 20px;
  background: rgba(45,99,173,.08);
  color: #2d63ad;
  border: 1px solid rgba(45,99,173,.15);
  margin-bottom: 14px;
}

.device-card .card-actions {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

/* ── Empty / error / loading states ── */
.state-card {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: rgba(0,0,0,.4);
}
.state-card svg { margin-bottom: 14px; }
.state-card .state-title {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(0,0,0,.5);
  margin-bottom: 6px;
}
.state-card .state-sub { font-size: 0.85rem; }

/* ── Skeleton loading ── */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 8px;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 16px;
  overflow: hidden;
}
.skeleton-img   { aspect-ratio: 4 / 3; height: auto; }
.skeleton-line  { height: 12px; margin: 10px 18px 6px; }
.skeleton-line.short  { width: 55%; }
.skeleton-line.medium { width: 75%; }
.skeleton-btn   { height: 30px; width: 80px; margin: 14px 18px 18px; border-radius: 6px; }

/* ── Error banner ── */
.error-banner {
  background: rgba(220,53,69,.06);
  border: 1px solid rgba(220,53,69,.2);
  border-radius: 12px;
  padding: 14px 18px;
  color: #dc3545;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── Result count ── */
.result-count {
  font-size: 0.82rem;
  color: rgba(0,0,0,.45);
}
