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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f9fafb;
}

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

/* Header Styles */
.header {
  background: white;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 50;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  font-size: 0.875rem;
  color: #6b7280;
}

.contact-info span {
  margin-right: 1rem;
}

.auth-links a {
  color: #6b7280;
  text-decoration: none;
  margin-left: 1rem;
  transition: color 0.2s;
}

.auth-links a:hover {
  color: #2563eb;
}

.main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.logo-icon {
  background: #2563eb;
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-weight: bold;
  font-size: 1.25rem;
  margin-right: 0.5rem;
}

.logo-title {
  font-weight: bold;
  font-size: 1.25rem;
  color: #111827;
}

.logo-subtitle {
  font-size: 0.75rem;
  color: #6b7280;
}

.search-container {
  flex: 1;
  max-width: 32rem;
  margin: 0 2rem;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem;
  padding-right: 3rem;
  border: 2px solid #e5e7eb;
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.search-input:focus {
  outline: none;
  border-color: #2563eb;
}

.search-btn {
  position: absolute;
  right: 0.25rem;
  top: 0.25rem;
  bottom: 0.25rem;
  background: #2563eb;
  color: white;
  border: none;
  padding: 0 1rem;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.search-btn:hover {
  background: #1d4ed8;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mobile-menu-btn {
  display: none;
}

.navigation {
  padding-bottom: 1rem;
}

.navigation a {
  color: #374151;
  text-decoration: none;
  font-weight: 500;
  margin-right: 2rem;
  transition: color 0.2s;
}

.navigation a:hover {
  color: #2563eb;
}

/* Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.875rem;
}

.btn i {
  margin-right: 0.5rem;
}

.btn-primary {
  background: #16a34a;
  color: white;
}

.btn-primary:hover {
  background: #15803d;
}

.btn-success {
  background: #16a34a;
  color: white;
  font-size: 1.125rem;
  padding: 0.75rem 2rem;
}

.btn-success:hover {
  background: #15803d;
}

.btn-outline {
  border: 1px solid #d1d5db;
  color: #374151;
  background: white;
}

.btn-outline:hover {
  background: #f9fafb;
}

.btn-outline-white {
  border: 1px solid white;
  color: white;
  background: transparent;
  font-size: 1.125rem;
  padding: 0.75rem 2rem;
}

.btn-outline-white:hover {
  background: white;
  color: #2563eb;
}

/* Hero Section */
.hero {
  background: linear-gradient(to right, #2563eb, #1e40af);
  color: white;
  padding: 4rem 0;
  text-align: center;
}

.hero h1 {
  font-size: 3rem;
  font-weight: bold;
  margin-bottom: 1.5rem;
}

.hero p {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Statistics */
.statistics {
  background: white;
  padding: 3rem 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  text-align: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.stat-number.blue {
  color: #2563eb;
}
.stat-number.green {
  color: #16a34a;
}
.stat-number.purple {
  color: #9333ea;
}
.stat-number.orange {
  color: #ea580c;
}

.stat-label {
  color: #6b7280;
}

/* Sections */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: bold;
  color: #111827;
  margin-bottom: 1rem;
}

.section-header p {
  font-size: 1.125rem;
  color: #6b7280;
}

.section-header-with-button {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 2rem;
}

.section-header-with-button h2 {
  font-size: 2rem;
  font-weight: bold;
  color: #111827;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
}

.section-header-with-button h2 i {
  color: #eab308;
  margin-right: 0.75rem;
}

.section-header-with-button p {
  color: #6b7280;
}

/* Categories */
.categories {
  padding: 4rem 0;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.category-card {
  background: white;
  padding: 1.5rem;
  border-radius: 0.5rem;
  text-align: center;
  text-decoration: none;
  color: inherit;
  border: 1px solid #e5e7eb;
  transition: box-shadow 0.2s;
}

.category-card:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.category-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.category-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.category-count {
  background: #f3f4f6;
  color: #374151;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
}

/* Featured Ads */
.featured-ads {
  background: #fefce8;
  padding: 4rem 0;
}

.latest-ads {
  padding: 4rem 0;
}

.ads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 1.5rem;
}

.ads-grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.ad-card {
  background: white;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.2s;
}

.ad-card:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.ad-image {
  position: relative;
  height: 12rem;
  overflow: hidden;
}

.ad-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ad-badge {
  position: absolute;
  top: 0.5rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.ad-badge.top {
  left: 0.5rem;
  background: #eab308;
  color: white;
}

.ad-badge.condition {
  right: 0.5rem;
  background: rgba(255, 255, 255, 0.9);
  color: #374151;
}

.ad-content {
  padding: 1rem;
}

.ad-content h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.ad-content p {
  color: #6b7280;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.ad-price-category {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.ad-price {
  font-size: 1.5rem;
  font-weight: bold;
  color: #16a34a;
}

.ad-category {
  background: #f3f4f6;
  color: #374151;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  border: 1px solid #e5e7eb;
}

.ad-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  color: #6b7280;
}

.ad-meta span i {
  margin-right: 0.25rem;
}

/* Benefits */
.benefits {
  background: #f3f4f6;
  padding: 4rem 0;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  text-align: center;
}

.benefit-item {
  background: white;
  padding: 2rem;
  border-radius: 0.5rem;
}

.benefit-icon {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 2rem;
}

.benefit-icon.blue {
  background: #dbeafe;
  color: #2563eb;
}

.benefit-icon.green {
  background: #dcfce7;
  color: #16a34a;
}

.benefit-icon.purple {
  background: #f3e8ff;
  color: #9333ea;
}

.benefit-item h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.benefit-item p {
  color: #6b7280;
}

/* Footer */
.footer {
  background: #111827;
  color: white;
  padding: 3rem 0 1rem;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-main {
  max-width: 400px;
}

.footer-logo {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.footer-logo .logo-icon {
  background: #2563eb;
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-weight: bold;
  font-size: 1.25rem;
  margin-right: 0.5rem;
}

.footer-logo .logo-title {
  font-weight: bold;
  font-size: 1.25rem;
}

.footer-logo .logo-subtitle {
  font-size: 0.875rem;
  color: #9ca3af;
}

.footer-main p {
  color: #9ca3af;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.footer-contact span {
  color: #9ca3af;
  margin-right: 1rem;
}

.footer-links h3,
.footer-legal h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-links ul,
.footer-legal ul {
  list-style: none;
}

.footer-links li,
.footer-legal li {
  margin-bottom: 0.5rem;
}

.footer-links a,
.footer-legal a {
  color: #9ca3af;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover,
.footer-legal a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid #374151;
  padding-top: 2rem;
  text-align: center;
  color: #9ca3af;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1.25rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .main-header {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .search-container {
    order: 3;
    flex-basis: 100%;
    margin: 0;
  }

  .mobile-menu-btn {
    display: block;
  }

  .navigation {
    display: none;
  }

  .section-header-with-button {
    flex-direction: column;
    align-items: start;
    gap: 1rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

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

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

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

  .ads-grid-4 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 0.5rem;
  }

  .top-bar {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  .contact-info span {
    margin: 0 0.5rem;
  }

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

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