/* ============ RESET & BASE ============ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-hover: #f5f5f5;
  --border: #e5e7eb;
  --border-light: #f0f0f0;
  --text: #111827;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #eef2ff;
  --primary-50: rgba(79, 70, 229, 0.08);
  --accent: #06b6d4;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
button { cursor: pointer; font-family: inherit; }

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

/* ============ NAV ============ */
.nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(255,255,255,0.92);
}
.nav-inner {
  display: flex;
  align-items: center;
  height: 64px;
  gap: 32px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.5px;
  flex-shrink: 0;
}
.logo-icon {
  color: var(--primary);
  font-size: 1.5rem;
  line-height: 1;
}
.logo-text { color: var(--text); }
.logo-accent { color: var(--primary); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.15s;
}
.nav-link:hover, .nav-link.active {
  color: var(--text);
  background: var(--surface-hover);
}
.nav-actions { display: flex; gap: 8px; flex-shrink: 0; }
.mobile-menu-btn { display: none; background: none; border: none; color: var(--text); }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-sm { padding: 7px 16px; font-size: 0.8125rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-primary {
  background: var(--primary);
  color: white;
}
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover { background: var(--surface-hover); border-color: var(--text-muted); }
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover { background: var(--surface-hover); color: var(--text); }

/* ============ HERO ============ */
.hero {
  padding: 80px 0 60px;
  text-align: center;
  background: linear-gradient(180deg, var(--primary-light) 0%, var(--bg) 100%);
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}
.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
}
.hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 16px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}
.hero h1 span { color: var(--primary); }
.hero-sub {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

/* Search bar */
.search-bar {
  max-width: 580px;
  margin: 0 auto 48px;
  position: relative;
}
.search-bar input {
  width: 100%;
  padding: 16px 20px 16px 48px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: var(--font);
  background: var(--surface);
  color: var(--text);
  transition: all 0.2s;
  box-shadow: var(--shadow-md);
}
.search-bar input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-50), var(--shadow-md);
}
.search-bar input::placeholder { color: var(--text-muted); }
.search-bar-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.search-bar .search-submit {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background 0.15s;
}
.search-bar .search-submit:hover { background: var(--primary-hover); }

/* Live search dropdown */
.search-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 50;
  display: none;
  max-height: 400px;
  overflow-y: auto;
}
.search-dropdown.active { display: block; }
.search-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  transition: background 0.1s;
}
.search-dropdown-item:hover { background: var(--surface-hover); }
.search-dropdown-item .tool-info { flex: 1; }
.search-dropdown-item .tool-name { font-weight: 600; font-size: 0.875rem; }
.search-dropdown-item .tool-tagline { font-size: 0.75rem; color: var(--text-muted); }
.search-dropdown-item .tool-rating { font-size: 0.75rem; color: var(--warning); font-weight: 600; }

/* Stats bar */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  padding-top: 32px;
}
.hero-stat { text-align: center; }
.hero-stat-number {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
}
.hero-stat-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ============ CATEGORIES GRID ============ */
.section {
  padding: 64px 0;
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}
.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.section-subtitle {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin-top: 4px;
}
.section-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 4px;
}
.section-link:hover { text-decoration: underline; }

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.category-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.2s;
}
.category-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.category-icon {
  font-size: 1.5rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.category-info {}
.category-name {
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.3;
}
.category-count {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ============ TOOL CARDS ============ */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all 0.2s;
  position: relative;
  display: flex;
  flex-direction: column;
}
.tool-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.tool-card.featured {
  border-color: var(--warning);
  background: linear-gradient(135deg, #fffbeb 0%, var(--surface) 50%);
}
.tool-card.featured::before {
  content: 'Featured';
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 3px 10px;
  background: var(--warning);
  color: white;
  font-size: 0.6875rem;
  font-weight: 700;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.tool-card-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}
.tool-logo {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--primary);
  flex-shrink: 0;
}
.tool-card-meta {}
.tool-card-name {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 2px;
}
.tool-card-category {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}
.tool-card-tagline {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 16px;
  flex: 1;
}
.tool-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
}
.tool-rating {
  display: flex;
  align-items: center;
  gap: 6px;
}
.tool-rating-stars {
  color: var(--warning);
  font-size: 0.8125rem;
  letter-spacing: 1px;
}
.tool-rating-score {
  font-weight: 700;
  font-size: 0.875rem;
}
.tool-rating-count {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.tool-pricing-badge {
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}
.tool-pricing-badge.free { background: #d1fae5; color: #065f46; }
.tool-pricing-badge.freemium { background: #dbeafe; color: #1e40af; }
.tool-pricing-badge.paid { background: #fef3c7; color: #92400e; }

/* ============ TOOL DETAIL PAGE ============ */
.tool-hero {
  padding: 40px 0 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.tool-hero-inner {
  max-width: 900px;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb-sep { color: var(--border); }

.tool-detail-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 20px;
}
.tool-detail-logo {
  width: 72px;
  height: 72px;
  border-radius: var(--radius);
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 2rem;
  color: var(--primary);
  flex-shrink: 0;
}
.tool-detail-info { flex: 1; }
.tool-detail-name {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}
.tool-detail-tagline {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}
.tool-detail-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.tool-detail-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
}

.tool-detail-tabs {
  display: flex;
  gap: 0;
  border-bottom: none;
}
.tool-detail-tab {
  padding: 12px 24px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
}
.tool-detail-tab:hover { color: var(--text); }
.tool-detail-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tool-content {
  padding: 48px 0;
}
.tool-content-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 40px;
  max-width: 900px;
}
.tool-main {}
.tool-sidebar {}

.tool-section {
  margin-bottom: 36px;
}
.tool-section-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.3px;
}
.tool-description {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.pros-cons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.pros-list, .cons-list {
  list-style: none;
}
.pros-list li, .cons-list li {
  padding: 8px 0;
  font-size: 0.875rem;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--text-secondary);
}
.pros-list li::before { content: '✓'; color: var(--success); font-weight: 700; }
.cons-list li::before { content: '✕'; color: var(--danger); font-weight: 700; }

.features-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.feature-tag {
  padding: 6px 14px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 100px;
  font-size: 0.8125rem;
  font-weight: 500;
}

/* Sidebar card */
.sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
}
.sidebar-card-title {
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}
.sidebar-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.875rem;
}
.sidebar-item:last-child { border-bottom: none; }
.sidebar-item-label { color: var(--text-secondary); }
.sidebar-item-value { font-weight: 600; }

/* ============ CATEGORY PAGE ============ */
.category-hero {
  padding: 40px 0 32px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.category-hero-inner {
  display: flex;
  align-items: center;
  gap: 20px;
}
.category-hero-icon {
  font-size: 3rem;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
}
.category-hero-title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.category-hero-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-top: 4px;
  max-width: 500px;
}

.filters-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 0;
  flex-wrap: wrap;
}
.filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
}
.filter-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 500;
}
.filter-select {
  padding: 7px 32px 7px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  font-size: 0.8125rem;
  font-family: var(--font);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.filter-select:focus { outline: none; border-color: var(--primary); }

.results-count {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-left: auto;
}

/* Tool list view for category pages */
.tools-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.tool-list-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.2s;
}
.tool-list-item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}
.tool-list-item.featured {
  border-color: var(--warning);
  background: linear-gradient(90deg, #fffbeb 0%, var(--surface) 30%);
}
.tool-list-rank {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-muted);
  width: 32px;
  text-align: center;
}
.tool-list-logo {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--primary);
  flex-shrink: 0;
}
.tool-list-info { flex: 1; min-width: 0; }
.tool-list-name { font-weight: 700; font-size: 1rem; margin-bottom: 2px; }
.tool-list-tagline {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tool-list-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}
.tool-list-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  font-size: 0.875rem;
}
.tool-list-rating svg { color: var(--warning); }

/* ============ FEATURED / CTA SECTION ============ */
.featured-section {
  padding: 80px 0;
  background: linear-gradient(135deg, #312e81 0%, #4f46e5 50%, #6366f1 100%);
  color: white;
}
.featured-section .section-title { color: white; }
.featured-section .section-subtitle { color: rgba(255,255,255,0.7); }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}
.pricing-card {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius);
  padding: 32px;
  backdrop-filter: blur(12px);
  transition: all 0.2s;
}
.pricing-card:hover {
  background: rgba(255,255,255,0.15);
  transform: translateY(-4px);
}
.pricing-card.popular {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.3);
  position: relative;
}
.pricing-card.popular::before {
  content: 'Most Popular';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--warning);
  color: #92400e;
  padding: 4px 16px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
}
.pricing-tier {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.7;
  margin-bottom: 8px;
}
.pricing-price {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 4px;
}
.pricing-price span { font-size: 1rem; opacity: 0.7; font-weight: 400; }
.pricing-desc {
  font-size: 0.875rem;
  opacity: 0.7;
  margin-bottom: 24px;
}
.pricing-features {
  list-style: none;
  margin-bottom: 28px;
}
.pricing-features li {
  padding: 6px 0;
  font-size: 0.875rem;
  opacity: 0.9;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pricing-features li::before {
  content: '✓';
  color: var(--success);
  font-weight: 700;
}
.btn-white {
  background: white;
  color: var(--primary);
  width: 100%;
  padding: 12px;
  font-weight: 700;
}
.btn-white:hover { background: #f0f0ff; transform: translateY(-1px); }

/* ============ SEARCH PAGE ============ */
.search-hero {
  padding: 48px 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.search-hero h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 20px;
}
.search-hero .search-bar { margin-bottom: 0; }

.search-results {
  padding: 32px 0;
}
.search-results-header {
  margin-bottom: 24px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}
.search-results-header strong { color: var(--text); }

.empty-state {
  text-align: center;
  padding: 80px 0;
}
.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}
.empty-state-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.empty-state-desc {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  max-width: 400px;
  margin: 0 auto;
}

/* ============ ERROR PAGE ============ */
.error-page {
  text-align: center;
  padding: 120px 0;
}
.error-page h1 {
  font-size: 2rem;
  margin-bottom: 12px;
}
.error-page p {
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* ============ ALL TOOLS PAGE ============ */
.page-header {
  padding: 40px 0 32px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.page-header h1 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.page-header p {
  color: var(--text-secondary);
  margin-top: 6px;
}

/* Category pills */
.category-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 20px 0;
}
.category-pill {
  padding: 7px 16px;
  border-radius: 100px;
  font-size: 0.8125rem;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  transition: all 0.15s;
  cursor: pointer;
}
.category-pill:hover, .category-pill.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 8px;
    box-shadow: var(--shadow-lg);
  }
  .nav-actions { display: none; }
  .mobile-menu-btn { display: block; margin-left: auto; }

  .hero { padding: 48px 0 40px; }
  .hero h1 { font-size: 2rem; }
  .hero-sub { font-size: 1rem; }
  .hero-stats { flex-direction: column; gap: 16px; }

  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .tools-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }

  .tool-content-grid { grid-template-columns: 1fr; }
  .tool-sidebar { order: -1; }
  .pros-cons-grid { grid-template-columns: 1fr; }

  .tool-list-item { flex-wrap: wrap; }
  .tool-list-tagline { white-space: normal; }
  .tool-list-meta { width: 100%; justify-content: flex-end; }

  .category-hero-inner { flex-direction: column; text-align: center; }
  .category-hero-desc { max-width: 100%; }

  .footer-grid { grid-template-columns: 1fr 1fr; }

  .search-bar .search-submit { display: none; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .categories-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ============ FOOTER ============ */
.footer {
  padding: 64px 0 32px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand {}
.footer-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 12px;
  line-height: 1.6;
}
.footer-col {}
.footer-col h4 {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  color: var(--text);
}
.footer-col a {
  display: block;
  font-size: 0.875rem;
  color: var(--text-secondary);
  padding: 4px 0;
  transition: color 0.15s;
}
.footer-col a:hover { color: var(--primary); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--text-muted);
}
.footer-bottom a { color: var(--text-muted); }
.footer-bottom a:hover { color: var(--primary); }

/* ============ UTILITY ============ */
.text-center { text-align: center; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }
.mb-4 { margin-bottom: 16px; }
.mb-8 { margin-bottom: 32px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* Star rating helper */
.stars { color: var(--warning); letter-spacing: 1px; }
