:root {
  --bg: #f6f3ee;
  --card-bg: #ffffff;
  --ink: #2b241c;
  --muted: #74685a;
  --rosewood: #7a3b32;
  --rosewood-dark: #5c2b24;
  --green: #2f7a4d;
  --red: #b3412f;
  --amber: #c9862a;
  --border: #e4ddd2;
  --radius: 14px;
  --shadow: 0 4px 16px rgba(43, 36, 28, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
}

.site-header {
  background: linear-gradient(135deg, var(--rosewood), var(--rosewood-dark));
  color: #fff;
  padding: 2.5rem 1.5rem 2rem;
  text-align: center;
}

.site-header h1 {
  margin: 0;
  font-size: 2.1rem;
  letter-spacing: 0.02em;
}

.subtitle {
  margin: 0.4rem 0 0;
  opacity: 0.9;
  font-size: 1rem;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.75rem 1.25rem 3rem;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-btn {
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--muted);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-btn:hover {
  border-color: var(--rosewood);
  color: var(--rosewood);
}

.filter-btn.active {
  background: var(--rosewood);
  border-color: var(--rosewood);
  color: #fff;
}

.last-updated {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Mosaic / masonry layout via CSS columns */
.mosaic {
  column-count: 1;
  column-gap: 1.25rem;
}

@media (min-width: 640px) {
  .mosaic { column-count: 2; }
}

@media (min-width: 980px) {
  .mosaic { column-count: 3; }
}

.card {
  break-inside: avoid;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1.25rem;
  overflow: hidden;
  position: relative;
}

.card-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #ece4d8, #d9cfc0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
}

.card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ribbon {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: var(--amber);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
}

.card-body {
  padding: 1.1rem 1.25rem 1.3rem;
}

.card-body h2 {
  margin: 0 0 0.2rem;
  font-size: 1.15rem;
}

.location {
  margin: 0 0 0.6rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.6rem;
}

.badge::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: currentColor;
}

.badge.working {
  background: rgba(47, 122, 77, 0.12);
  color: var(--green);
}

.badge.broken {
  background: rgba(179, 65, 47, 0.12);
  color: var(--red);
}

.status-note {
  margin: 0 0 0.5rem;
  font-size: 0.88rem;
  color: var(--ink);
}

.condition-notes {
  margin: 0 0 0.85rem;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.4;
}

.price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-top: 1px dashed var(--border);
  padding-top: 0.75rem;
}

.price {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--rosewood);
}

.not-for-sale {
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
}

.listed-date {
  font-size: 0.78rem;
  color: var(--muted);
}

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 2rem 0;
}

.site-footer {
  text-align: center;
  padding: 1.5rem;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}
