/* ═══════════════════════════════════════════════════════
   Аналог — Промисловий B2B Каталог
   Premium Dark Theme
   ═══════════════════════════════════════════════════════ */

:root {
  --bg: #0a0a0f;
  --bg-card: #12121a;
  --bg-card-hover: #1a1a28;
  --bg-glass: rgba(18, 18, 26, 0.85);
  --border: rgba(255,255,255,0.06);
  --border-hover: rgba(255,255,255,0.12);
  --text: #e4e4eb;
  --text-muted: #6b6b80;
  --text-dim: #4a4a5e;
  --primary: #6366f1;
  --primary-glow: rgba(99,102,241,0.15);
  --accent: #22d3ee;
  --accent-glow: rgba(34,211,238,0.12);
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --transition: all 0.2s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
}

/* ─── Навбар ───────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 24px;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 20px;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
}
.nav-brand i { -webkit-text-fill-color: #6366f1; font-size: 22px; }

.nav-search {
  flex: 1;
  max-width: 560px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 14px;
  transition: var(--transition);
}
.nav-search:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.nav-search i { color: var(--text-muted); font-size: 14px; }
.nav-search input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
}
.nav-search input::placeholder { color: var(--text-dim); }
.nav-search kbd {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
  font-family: inherit;
}

.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.nav-link:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.nav-link.active { background: var(--primary-glow); color: var(--primary); }

/* ─── Головна ──────────────────────────────────────── */
main { flex: 1; padding: 24px; max-width: 1280px; margin: 0 auto; width: 100%; }

.hero {
  text-align: center;
  padding: 48px 0 36px;
}
.hero h1 {
  font-size: 40px;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
}
.hero p { color: var(--text-muted); font-size: 16px; max-width: 600px; margin: 0 auto; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 32px 0;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
}
.stat-card:hover { border-color: var(--border-hover); transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.stat-icon.purple { background: var(--primary-glow); color: var(--primary); }
.stat-icon.cyan { background: var(--accent-glow); color: var(--accent); }
.stat-icon.green { background: rgba(34,197,94,0.12); color: var(--success); }
.stat-icon.orange { background: rgba(245,158,11,0.12); color: var(--warning); }
.stat-value { font-size: 28px; font-weight: 700; }
.stat-label { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* ─── Каталог / Результати ─────────────────────────── */
.section-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title i { color: var(--primary); }

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 14px;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  cursor: pointer;
  transition: var(--transition);
}
.product-card:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  transform: translateY(-2px);
}
.product-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
}
.badge-brand { background: var(--primary-glow); color: var(--primary); }
.badge-cat { background: var(--accent-glow); color: var(--accent); }
.badge-unit { background: rgba(255,255,255,0.05); color: var(--text-muted); }

.product-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.product-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--success);
}
.product-price small { font-size: 12px; color: var(--text-muted); font-weight: 400; }
.product-analogs {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ─── Деталі товару ────────────────────────────────── */
.detail-container { max-width: 900px; }
.detail-header { margin-bottom: 24px; }
.detail-header h1 { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.detail-header .product-meta { margin-bottom: 0; }

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.detail-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.detail-box h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.spec-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.spec-row:last-child { border-bottom: none; }
.spec-key { color: var(--text-muted); }
.spec-val { font-weight: 500; text-align: right; }

.analog-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
}
.analog-card:hover { padding-left: 6px; color: var(--primary); }
.analog-card:last-child { border-bottom: none; }
.analog-name { font-size: 13px; font-weight: 500; }
.analog-brand { font-size: 11px; color: var(--text-muted); }
.analog-price { font-size: 14px; font-weight: 600; color: var(--success); white-space: nowrap; }

.supplier-card-detail {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.supplier-card-detail:last-child { border-bottom: none; }
.supplier-info h4 { font-size: 14px; font-weight: 600; }
.supplier-info p { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.supplier-contacts { display: flex; gap: 8px; }
.supplier-contacts a {
  display: flex; align-items: center; gap: 4px;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-size: 12px;
  transition: var(--transition);
  white-space: nowrap;
}
.supplier-contacts a:hover { border-color: var(--primary); color: var(--primary); }

/* ─── Постачальники ────────────────────────────────── */
.suppliers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 14px;
}
.supplier-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: var(--transition);
}
.supplier-card:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.supplier-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.supplier-card .full-name { font-size: 12px; color: var(--text-muted); margin-bottom: 12px; }
.supplier-card .desc { font-size: 13px; color: var(--text-muted); margin-bottom: 14px; line-height: 1.5; }
.supplier-card .brands-list { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 14px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
}
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn-primary {
  background: var(--gradient);
  border: none;
  color: #fff;
}
.btn-primary:hover { opacity: 0.9; transform: scale(1.02); color: #fff; }

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
  margin-bottom: 16px;
  transition: var(--transition);
}
.back-btn:hover { color: var(--primary); }

/* ─── Категорії ────────────────────────────────────── */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 32px;
}
.cat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  text-align: center;
  transition: var(--transition);
}
.cat-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.cat-card i { font-size: 24px; margin-bottom: 8px; display: block; }
.cat-card .cat-name { font-size: 13px; font-weight: 500; }
.cat-card .cat-count { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* ─── Пагінація ────────────────────────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
}
.pagination button {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  transition: var(--transition);
}
.pagination button:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.pagination button:disabled { opacity: 0.3; cursor: not-allowed; }
.pagination .page-info { font-size: 13px; color: var(--text-muted); }

/* ─── Loader ───────────────────────────────────────── */
.loader {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  color: var(--text-muted);
  font-size: 14px;
  gap: 10px;
}
.loader i { animation: spin 1s linear infinite; color: var(--primary); }
@keyframes spin { to { transform: rotate(360deg); } }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state i { font-size: 40px; margin-bottom: 12px; display: block; opacity: 0.3; }

/* ─── Футер ────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 16px 24px;
  margin-top: auto;
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-dim);
}
.footer-api a { color: var(--primary); text-decoration: none; }

/* ─── Responsive ───────────────────────────────────── */
@media (max-width: 768px) {
  .navbar { flex-wrap: wrap; gap: 10px; padding: 10px 16px; }
  .nav-search { order: 3; max-width: 100%; flex-basis: 100%; }
  .nav-search kbd { display: none; }
  .nav-links { gap: 2px; }
  .nav-link span { display: none; }
  main { padding: 16px; }
  .hero h1 { font-size: 28px; }
  .detail-grid { grid-template-columns: 1fr; }
  .products-grid { grid-template-columns: 1fr; }
  .suppliers-grid { grid-template-columns: 1fr; }
  .categories-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .footer-inner { flex-direction: column; gap: 4px; text-align: center; }
}
. b t n   {   w h i t e - s p a c e :   n o w r a p   ! i m p o r t a n t ;   }  
 