/* ============================================
   YELLOW.bot Registry — styles.css
   Dark theme, LLM-optimized semantic tables
   ============================================ */

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

:root {
  --bg-dark: #0d0d0d;
  --bg-alt: #111111;
  --bg-card: #1a1a1a;
  --border-color: #27272a;
  --border-hover: #3f3f46;
  --yellow: #FFD000;
  --yellow-light: #FFE033;
  --yellow-dark: #E6BB00;
  --gradient: linear-gradient(135deg, #FFD000, #FFE033);
  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --green: #22c55e;
  --red: #ef4444;
  --blue: #60a5fa;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--yellow); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); font-weight: 700; }

/* ============================================
   Navigation
   ============================================ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 13, 13, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding: 0 24px;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.nav-brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary) !important;
  text-decoration: none !important;
}

.brand { font-size: 1.1rem; font-weight: 700; }
.brand-y { color: var(--yellow); }
.brand-dot { color: var(--text-muted); font-weight: 400; }

.nav-links-bar {
  display: flex;
  gap: 28px;
}

.nav-links-bar a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
}

.nav-links-bar a:hover { color: var(--text-primary); text-decoration: none; }

/* ============================================
   Main Content
   ============================================ */
.main-content {
  flex: 1;
  padding: 32px 0;
}

.page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin: 8px 0 32px;
  max-width: 800px;
}

.result-count {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 0.7em;
}

/* ============================================
   Breadcrumb
   ============================================ */
.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--yellow); }

/* ============================================
   Category Grid
   ============================================ */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.category-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all 0.3s ease;
  color: var(--text-primary) !important;
  text-decoration: none !important;
}

.category-card:hover {
  border-color: var(--yellow);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(255, 208, 0, 0.1);
}

.category-card h3 { margin-bottom: 8px; font-size: 1.2rem; }
.category-meta { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 12px; }
.category-count { color: var(--yellow); font-weight: 600; font-size: 0.95rem; }

/* ============================================
   Filter Form
   ============================================ */
.filter-form {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: end;
}

.filter-row + .filter-row { margin-top: 16px; }

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 130px;
  flex: 1;
}

.filter-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.filter-group input[type="text"],
.filter-group input[type="number"],
.filter-group select {
  padding: 10px 14px;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.9rem;
}

.filter-group input:focus,
.filter-group select:focus {
  outline: none;
  border-color: var(--yellow);
}

.filter-group input::placeholder { color: var(--text-muted); }

.filter-checkbox {
  flex-direction: row;
  align-items: center;
  min-width: auto;
}

.filter-checkbox label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  text-transform: none;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
}

.filter-checkbox input[type="checkbox"] {
  accent-color: var(--yellow);
  width: 16px;
  height: 16px;
}

.btn-filter {
  padding: 10px 24px;
  background: var(--gradient);
  color: #0d0d0d;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.btn-filter:hover {
  box-shadow: 0 4px 16px rgba(255, 208, 0, 0.3);
  transform: translateY(-1px);
}

/* ============================================
   Registry Table
   ============================================ */
.registry-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.registry-table caption {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border-color);
}

.registry-table thead {
  background: var(--bg-alt);
}

.registry-table th {
  padding: 12px 14px;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--border-color);
  white-space: nowrap;
}

.registry-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
  vertical-align: middle;
}

.registry-table tbody tr:hover {
  background: rgba(255, 208, 0, 0.03);
}

.registry-table tbody tr:last-child td {
  border-bottom: none;
}

.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }

/* ============================================
   Badges
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  vertical-align: middle;
}

.badge-verified { background: rgba(255, 208, 0, 0.15); color: var(--yellow); }
.badge-claimed { background: rgba(96, 165, 250, 0.15); color: var(--blue); }
.badge-unverified { background: rgba(113, 113, 122, 0.15); color: var(--text-muted); }
.badge-stock-yes { background: rgba(34, 197, 94, 0.12); color: var(--green); }
.badge-stock-no { background: rgba(239, 68, 68, 0.12); color: var(--red); }
.badge-manufacturer { background: rgba(255, 208, 0, 0.15); color: var(--yellow); }
.badge-dealer { background: rgba(34, 197, 94, 0.12); color: var(--green); }
.badge-distributor { background: rgba(96, 165, 250, 0.12); color: var(--blue); }

.trust-score {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.trust-high { background: rgba(255, 208, 0, 0.12); color: var(--yellow); }
.trust-med { background: rgba(96, 165, 250, 0.12); color: var(--blue); }
.trust-low { background: rgba(113, 113, 122, 0.12); color: var(--text-muted); }

/* ============================================
   Pagination
   ============================================ */
.pagination {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  padding: 16px 0;
}

.pagination a,
.pagination .page-current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
}

.pagination a {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  text-decoration: none;
}

.pagination a:hover {
  border-color: var(--yellow);
  color: var(--yellow);
}

.page-current {
  background: var(--yellow);
  color: #0d0d0d;
  font-weight: 700;
}

/* ============================================
   Provider Detail
   ============================================ */
.provider-header { margin-bottom: 24px; }
.provider-header h1 { margin-bottom: 8px; }

.provider-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.provider-id {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--bg-card);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}

.provider-country {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.provider-info { margin-bottom: 32px; }

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.info-item dt {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.info-item dd {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.provider-products h2 { margin-bottom: 16px; }
.provider-listings h2 { margin-bottom: 16px; }

/* ============================================
   No Results
   ============================================ */
.no-results {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
  font-size: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
  border-top: 1px solid var(--border-color);
  padding: 24px;
  margin-top: auto;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-container p { font-size: 0.85rem; color: var(--text-muted); }
.footer-onespec { color: var(--yellow); font-weight: 600; }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 968px) {
  .registry-table { font-size: 0.8rem; }
  .registry-table th, .registry-table td { padding: 8px 10px; }
  .filter-row { flex-direction: column; }
  .filter-group { min-width: 100%; }
  .info-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .nav-links-bar { display: none; }
  .registry-table { display: block; overflow-x: auto; }
  .footer-container { flex-direction: column; gap: 8px; text-align: center; }
  .provider-meta { flex-direction: column; align-items: flex-start; }
}
