/* =====================================================
   theXchange — main styles
   clean, white background / minimal
   ===================================================== */

:root {
  --bg: #ffffff;
  --text: #111111;
  --muted: #6b6b6b;
  --accent: #0a84ff;
  --accent-dark: #0066cc;
  --border: #e0e0e0;
  --radius: 8px;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  --max-width: 1100px;
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 0;
  line-height: 1.5;
}

/* =====================================================
   NAVIGATION BAR
   ===================================================== */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.nav a {
  color: var(--text);
  text-decoration: none;
  margin-left: 1rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--accent);
}

.brand {
  display: flex;
  align-items: center;
  font-size: 1.2rem;
  font-weight: 800;
}

.brand-badge {
  background: var(--text);
  color: var(--bg);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  font-size: 0.9rem;
  margin-right: 0.5rem;
  font-weight: 700;
}

/* =====================================================
   GLOBAL ELEMENTS
   ===================================================== */

.container {
  max-width: var(--max-width);
  margin: 2rem auto;
  padding: 0 1.5rem;
}

h1, h2, h3 {
  margin-top: 0;
  font-weight: 700;
}

p {
  margin: 0.4rem 0;
}

.muted {
  color: var(--muted);
  font-size: 0.95rem;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}

ul {
  margin: 0.5rem 0;
}

/* =====================================================
   BUTTONS
   ===================================================== */

.btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #f7f7f7;
  color: var(--text);
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.btn:hover {
  background: #f0f0f0;
}

.btn.primary {
  background: var(--accent);
  border-color: var(--accent-dark);
  color: white;
}

.btn.primary:hover {
  background: var(--accent-dark);
}

/* =====================================================
   FORMS
   ===================================================== */

form {
  display: grid;
  gap: 1rem;
}

label {
  display: flex;
  flex-direction: column;
  font-weight: 600;
  font-size: 0.95rem;
}

input, select {
  margin-top: 0.4rem;
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 1rem;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

/* =====================================================
   TOOL CARDS
   ===================================================== */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.tool-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  background: white;
  display: flex;
  flex-direction: column;
}

.tool-image {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 0.8rem;
}

.tool-name {
  margin: 0;
  font-size: 1.1rem;
}

.tool-desc {
  color: var(--muted);
  margin: 0.3rem 0 0.5rem;
  font-size: 0.95rem;
}

.tool-meta {
  font-size: 0.9rem;
  color: var(--muted);
}

/* =====================================================
   PRICE & BADGES
   ===================================================== */

.price-free {
  background: #eaf6eb;
  color: #1a7f37;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.85rem;
}

.price-paid {
  background: #fff3e0;
  color: #d17a00;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.85rem;
}

.badge-featured {
  background: var(--accent);
  color: white;
  border-radius: 6px;
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.badge-example {
  background: #f0f0f0;
  color: var(--muted);
  border-radius: 6px;
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
}

/* =====================================================
   SEARCH BAR
   ===================================================== */

.search-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.search-input {
  width: 100%;
  max-width: 600px;
  padding: 0.8rem 1rem;
  font-size: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
}

/* =====================================================
   TOOL DETAIL PAGE
   ===================================================== */

.tool-detail {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  background: white;
}

.tool-hero {
  width: 100%;
  border-radius: var(--radius);
  height: 250px;
  object-fit: cover;
  margin-bottom: 1rem;
}

/* =====================================================
   REVIEWS
   ===================================================== */

.review {
  background: #f9f9f9;
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  border: 1px solid var(--border);
  margin-bottom: 0.8rem;
}

.review-form {
  margin-top: 1rem;
}

.review-form input,
.review-form select {
  width: 100%;
}

/* =====================================================
   PROMO BLOCK
   ===================================================== */

.promo {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fafafa;
}

/* =====================================================
   LAYOUT HELPERS
   ===================================================== */

.row {
  display: flex;
  align-items: center;
}

.row.gap {
  gap: 0.5rem;
}

.row.between {
  justify-content: space-between;
}

.spacer {
  flex: 1;
}

.empty-state {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  background: #fcfcfc;
  color: var(--muted);
  font-size: 0.9rem;
}

/* =====================================================
   MOBILE
   ===================================================== */

@media (max-width: 700px) {
  .nav {
    flex-wrap: wrap;
    gap: 0.6rem;
  }
  .promo {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  .tool-hero {
    height: 180px;
  }
}




