/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--sp-2);
  padding: 0.6rem 1.2rem;
  border-radius: var(--r-md);
  font-size: 0.875rem; font-weight: 600;
  font-family: var(--font-body);
  transition: all var(--ease-base);
  cursor: pointer; border: 1px solid transparent;
  white-space: nowrap; line-height: 1;
}
.btn-primary {
  background: var(--grad-brand); color: #fff;
  box-shadow: 0 0 20px var(--purple-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px var(--purple-glow), 0 0 50px rgba(124,58,237,0.2);
}
.btn-ghost {
  background: transparent; color: var(--text-2);
  border-color: var(--border);
}
.btn-ghost:hover {
  border-color: var(--border-hover); color: var(--text-1);
  background: var(--bg-card);
}
.btn-lg { padding: 0.85rem 1.75rem; font-size: 1rem; border-radius: var(--r-lg); }
.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.8rem; }

/* ===== TOOL CARD ===== */
.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  transition: all var(--ease-base);
  display: flex; flex-direction: column; gap: var(--sp-4);
  position: relative; overflow: hidden;
  cursor: pointer; height: 100%;
}
.tool-card::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--grad-brand);
  opacity: 0; transition: opacity var(--ease-base);
}
.tool-card:hover {
  border-color: var(--border-accent);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.55), 0 0 24px var(--purple-glow);
}
.tool-card:hover::after { opacity: 1; }

.tool-card.featured { border-color: rgba(245,158,11,0.3); }
.tool-card.featured::after { background: var(--grad-gold); opacity: 0.7; }
.tool-card.featured:hover { border-color: rgba(245,158,11,0.55); }

/* Card Header */
.card-header { display: flex; align-items: flex-start; gap: var(--sp-3); }
.tool-logo {
  width: 50px; height: 50px; border-radius: var(--r-md); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; background: var(--bg-secondary); border: 1px solid var(--border);
}
.card-meta { flex: 1; min-width: 0; }
.card-name {
  font-family: var(--font-body); font-weight: 500; font-size: 0.975rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 3px;
}
.card-category { font-size: 0.72rem; color: var(--purple-light); font-weight: 600; }
.card-desc {
  font-size: 0.85rem; font-weight: 400; color: var(--text-2); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* Card Footer */
.card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.card-badges { display: flex; gap: var(--sp-1); flex-wrap: wrap; margin-top: var(--sp-1); }

/* ===== STAR RATING ===== */
.stars { display: inline-flex; align-items: center; gap: 2px; }
.stars svg { width: 13px; height: 13px; }
.star-on  { fill: var(--gold); }
.star-off { fill: none; stroke: var(--text-3); stroke-width: 1.5; }

.rating-row { display: inline-flex; align-items: center; gap: var(--sp-2); }
.rating-val { font-weight: 700; color: var(--gold); font-size: 0.85rem; }
.rating-cnt { color: var(--text-3); font-size: 0.75rem; }

/* ===== BADGES ===== */
.badge {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 3px 8px; border-radius: var(--r-full);
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.02em;
  line-height: 1;
}
.badge-free      { background: rgba(16,185,129,0.14); color: var(--green); }
.badge-freemium  { background: rgba(124,58,237,0.15); color: var(--purple-light); }
.badge-paid      { background: rgba(245,158,11,0.14); color: var(--gold); }
.badge-featured  { background: rgba(245,158,11,0.18); color: var(--gold-light); border: 1px solid rgba(245,158,11,0.38); }
.badge-trending  { background: rgba(239,68,68,0.14); color: #f87171; animation: pulseDot 2.5s ease-in-out infinite; }
.badge-new       { background: rgba(6,182,212,0.14); color: var(--cyan-light); }
.badge-verified  { background: rgba(124,58,237,0.12); color: var(--purple-light); }

/* ===== TOOLS GRID ===== */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
  gap: var(--sp-5);
}

/* ===== SEARCH BAR ===== */
.search-wrap { position: relative; }
.search-icon {
  position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
  color: var(--text-3); pointer-events: none;
  transition: color var(--ease-fast);
}
.search-input {
  width: 100%;
  padding: 0.9rem 1rem 0.9rem 2.9rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  color: var(--text-1); font-size: 1rem;
  outline: none; transition: all var(--ease-base);
}
.search-input::placeholder { color: var(--text-3); }
.search-input:focus {
  border-color: var(--purple);
  background: var(--bg-card-hover);
  box-shadow: 0 0 0 3px var(--purple-glow);
}
.search-wrap:focus-within .search-icon { color: var(--purple-light); }

/* ===== CHIPS ===== */
.chips { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.chip {
  padding: 0.38rem 0.85rem; border-radius: var(--r-full);
  border: 1px solid var(--border); background: var(--bg-card);
  color: var(--text-2); font-size: 0.8rem; font-weight: 500;
  cursor: pointer; transition: all var(--ease-fast); white-space: nowrap;
}
.chip:hover { border-color: var(--purple); color: var(--text-1); }
.chip.active { background: rgba(124,58,237,0.2); border-color: var(--purple); color: var(--purple-light); }

/* ===== SECTION HEADER ===== */
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-6); }
.section-title {
  display: flex; align-items: center; gap: var(--sp-2);
  font-family: var(--font-display); font-size: 1.4rem; font-weight: 700;
}
.section-icon { font-size: 1.2rem; }
.section-link {
  font-size: 0.875rem; color: var(--purple-light); font-weight: 500;
  transition: color var(--ease-fast); display: flex; align-items: center; gap: 4px;
}
.section-link:hover { color: var(--cyan-light); }

/* ===== AD SLOTS ===== */
.ad-slot {
  border: 1px dashed rgba(255,255,255,0.1);
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-tertiary);
  color: var(--text-3); overflow: hidden;
}
.ad-inner { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ad-label { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.5; }
.ad-text  { font-size: 0.75rem; font-weight: 500; }
.ad-leaderboard { width: 100%; height: 90px; }
.ad-rect         { width: 300px; height: 250px; }

/* ===== CATEGORY CARD ===== */
.cat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: var(--sp-5);
  text-align: center; cursor: pointer;
  transition: all var(--ease-base);
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-2);
  text-decoration: none;
}
.cat-card:hover {
  border-color: var(--purple); background: var(--bg-card-hover);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.45);
}
.cat-icon { font-size: 2rem; }
.cat-name { font-weight: 700; font-size: 0.9rem; font-family: var(--font-display); }
.cat-count { font-size: 0.75rem; color: var(--text-3); }

/* ===== EMPTY STATE ===== */
.empty-state { text-align: center; padding: var(--sp-16); color: var(--text-3); grid-column: 1/-1; }
.empty-icon  { font-size: 3rem; margin-bottom: var(--sp-4); }
.empty-state h3 { color: var(--text-2); margin-bottom: var(--sp-2); }

/* ===== SELECT ===== */
.styled-select {
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-1); padding: 0.5rem 1rem;
  border-radius: var(--r-md); font-size: 0.875rem;
  outline: none; cursor: pointer;
  transition: border-color var(--ease-fast);
}
.styled-select:hover { border-color: var(--border-hover); }
.styled-select option { background: var(--bg-secondary); }

/* ===== VISUAL REFINEMENT ===== */
.btn { border-radius: var(--r-full); }
.btn-primary { box-shadow: 0 8px 24px var(--purple-glow); }
.tool-card { box-shadow: inset 0 1px 0 rgba(255,255,255,0.03); }
.tool-card:hover { transform: translateY(-6px); }
.tool-logo { border-radius: 12px; }
.search-input { border-radius: var(--r-full); }
.chip { background: rgba(255,255,255,0.025); }
.section-title { font-size: 1.5rem; letter-spacing: -0.035em; }
.cat-card { box-shadow: inset 0 1px 0 rgba(255,255,255,0.03); }

/* ===== LIGHT BUSINESS DIRECTORY COMPONENTS ===== */
.btn { min-height: 40px; border-radius: 10px; font-weight: 600; }
.btn-primary { background: #2563eb; box-shadow: none; }
.btn-primary:hover { background: #1d4ed8; transform: translateY(-1px); box-shadow: 0 5px 14px rgba(37,99,235,.22); }
.btn-ghost { color: #2563eb; border-color: #bfdbfe; background: #eff6ff; }
.search-input { min-height: 64px; border-radius: 10px; background: #fff; border-color: #fff; color: var(--text-1); box-shadow: 0 8px 20px rgba(15,23,42,.08); }
.search-input::placeholder { color: #94a3b8; }
.search-input:focus { border-color: #bfdbfe; background: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.24); }
.search-icon { color: #94a3b8; }
.tool-card { background: #fff; border-color: var(--border); border-radius: 14px; box-shadow: var(--shadow-sm); padding: 1.25rem; gap: .9rem; }
.tool-card::after { display: none; }
.tool-card:hover { border-color: #bfdbfe; background: #fff; transform: translateY(-3px); box-shadow: var(--shadow-md); }
.tool-logo { width: 46px; height: 46px; background: #eff6ff; border: 0; border-radius: 10px; }
.card-name { font-size: 1rem; color: var(--text-1); }
.card-category { color: #2563eb; }
.card-desc { color: var(--text-2); }
.badge { border-radius: 999px; padding: 4px 9px; }
.badge-free { background: #dcfce7; color: #16a34a; }
.badge-freemium, .badge-verified { background: #eff6ff; color: #2563eb; }
.badge-paid, .badge-featured { background: #fef3c7; color: #b45309; border: 0; }
.chips { gap: .625rem; }
.chip { background: #fff; border-color: var(--border); color: var(--text-2); border-radius: 999px; }
.chip:hover, .chip.active { color: #2563eb; border-color: #bfdbfe; background: #eff6ff; }
.section-title { color: var(--text-1); font-size: 1.25rem; letter-spacing: -.02em; }
.section-link { color: #2563eb; }
.cat-card { align-items: flex-start; text-align: left; background: #fff; border-color: var(--border); border-radius: 14px; min-height: 160px; padding: 1.5rem; gap: .8rem; box-shadow: none; }
.cat-card:hover { border-color: #bfdbfe; background: #fff; transform: translateY(-3px); box-shadow: var(--shadow-md); }
.cat-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 10px; background: #eff6ff; font-size: 1.45rem; }
.cat-card:nth-child(3n+2) .cat-icon { background: #f3e8ff; }
.cat-card:nth-child(3n+3) .cat-icon { background: #fee2e2; }
.cat-card:nth-child(4n) .cat-icon { background: #dcfce7; }
.cat-name { font-size: .95rem; font-weight: 600; }
.cat-count { color: var(--text-2); }
.styled-select { background: #fff; color: var(--text-1); border-color: var(--border); }
.ad-slot { background: #f8fafc; border-color: #e2e8f0; color: #94a3b8; }
