/* Global reset-ish */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: #fafafa;
  color: #333;
}

/* Hero image */
.hero-image {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  display: block;
}

/* Header */
header {
  text-align: center;
  padding: 16px 12px 10px;
  background-color: #ffffff;
  border-bottom: 1px solid #eee;
}

header h1 {
  font-size: 2rem;
  margin-bottom: 6px;
  color: #2b3d4f;
}

header p {
  font-size: 0.98rem;
  line-height: 1.5;
  margin: 3px auto;
  max-width: 640px;
}

header .note {
  font-size: 0.9rem;
  color: #555;
  margin-top: 8px;
}

/* Contact line under header */
header .contact {
  font-size: 1rem;
  color: #004d40;
  font-weight: 600;
  margin-top: 12px;
}

header .contact strong {
  color: #00695c;
  font-weight: 700;
}

/* Filters */
.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background-color: #f3f3f3;
  border-bottom: 1px solid #e5e5e5;
}

.filters input,
.filters select {
  padding: 8px 10px;
  font-size: 0.95rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  min-width: 160px;
}

/* Grid container matches #itemsGrid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  padding: 16px;
}

/* Item card */
.item-card {
  background-color: #ffffff;
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

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

.item-card img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 4px;
}

/* Text inside cards */
.item-title {
  font-weight: 600;
  font-size: 0.96rem;
  color: #222;
}

.item-price {
  font-weight: 700;
  font-size: 0.95rem;
  color: #137333;
}

.item-desc {
  font-size: 0.8rem;
  color: #555;
}

.item-category {
  font-size: 0.75rem;
  color: #777;
}

/* Status badges */
.badge {
  display: inline-block;
  padding: 2px 6px;
  font-size: 0.72rem;
  border-radius: 4px;
  margin-left: 6px;
}

.badge-available {
  background-color: #e6f4ea;
  color: #137333;
}

.badge-sold {
  background-color: #fce8e6;
  color: #c5221f;
}

/* Sold styling */
.item-card.sold {
  opacity: 0.5;
}

.item-card.sold::after {
  content: "SOLD";
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 8px;
  background: #c5221f;
  color: #fff;
  font-weight: 700;
  font-size: 0.75rem;
  border-radius: 4px;
}

/* Footer */
.footer-note {
  text-align: center;
  font-size: 0.8rem;
  color: #777;
  padding: 10px 0 14px;
}

/* Mobile tweaks */
@media (max-width: 600px) {
  header h1 {
    font-size: 1.6rem;
  }

  header p {
    font-size: 0.9rem;
  }

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

  .grid {
    padding: 10px;
    gap: 10px;
  }
}
