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

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

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

header {
  background: #fff;
  padding: 30px 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

header h1 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.stats {
  color: #666;
  font-size: 0.95rem;
  margin-bottom: 15px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-btn {
  padding: 8px 16px;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.filter-btn:hover {
  border-color: #999;
}

.filter-btn.active {
  background: #333;
  color: #fff;
  border-color: #333;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.card-content {
  padding: 12px;
}

.card-color {
  font-weight: 500;
  margin-bottom: 6px;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #666;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
}

.badge-scale {
  background: #e3f2fd;
  color: #1565c0;
}

.badge-bagged {
  background: #f3e5f5;
  color: #7b1fa2;
}

/* Individual page styles */
.detail-page {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  overflow: hidden;
}

.nav-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid #eee;
  gap: 10px;
}

.nav-link {
  color: #333;
  text-decoration: none;
  font-size: 0.9rem;
}

.nav-link:hover {
  text-decoration: underline;
}

.nav-arrows {
  display: flex;
  gap: 15px;
}

.detail-image {
  width: 100%;
  max-height: 500px;
  object-fit: contain;
  background: #f9f9f9;
  display: block;
}

.detail-content {
  padding: 25px;
}

.detail-content h1 {
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.detail-table {
  width: 100%;
  border-collapse: collapse;
}

.detail-table tr {
  border-bottom: 1px solid #eee;
}

.detail-table tr:last-child {
  border-bottom: none;
}

.detail-table th,
.detail-table td {
  padding: 12px 0;
  text-align: left;
}

.detail-table th {
  font-weight: 500;
  color: #666;
  width: 140px;
}

@media (max-width: 600px) {
  header h1 {
    font-size: 1.5rem;
  }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
  }

  .card img {
    height: 140px;
  }

  .nav-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-arrows {
    width: 100%;
    justify-content: space-between;
  }
}
