/* app-content.css — listing & content blocks split out of app.css
   (300-line rule). Loaded globally right after app.css in layout.php. */

/* --- Category filter ---------------------------------------------- */

.category-filter { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.category-filter a { font-size: 0.85rem; padding: 0.25rem 0.65rem; border: 1px solid #ccc; border-radius: 3px; text-decoration: none; color: #333; }
.category-filter a:hover, .category-filter a.active { background: #6f35d4; color: #fff; border-color: #6f35d4; }

/* --- Listings browse ---------------------------------------------- */

.listings { display: grid; gap: 1rem; margin-top: 1.5rem; }

.listing-card { border: 1px solid #e5e5e5; border-radius: 6px; padding: 1rem; }
.listing-card h2 { margin: 0 0 0.25rem; font-size: 1.05rem; }
.listing-card h2 a { text-decoration: none; color: #1a1a1a; }
.listing-card h2 a:hover { color: #6f35d4; }
.listing-card .price { font-size: 1.1rem; font-weight: 700; margin: 0.25rem 0; }
.listing-card .meta { font-size: 0.8rem; color: #888; margin: 0; }

/* --- Pagination ---------------------------------------------------- */

.pagination { display: flex; justify-content: center; align-items: center; gap: 1rem; margin-top: 2rem; font-size: 0.9rem; }
.pagination a { color: #6f35d4; text-decoration: none; }
.pagination a:hover { text-decoration: underline; }

/* --- Listing detail ------------------------------------------------ */

.back { font-size: 0.9rem; color: #6f35d4; text-decoration: none; display: inline-block; margin-bottom: 1rem; }
.back:hover { text-decoration: underline; }
.description { line-height: 1.75; margin: 1.25rem 0; }

.warning {
  background: #fff7e6;
  border: 1px solid #f5c842;
  border-radius: 4px;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  margin: 1rem 0;
}

.owner-actions { display: flex; align-items: center; gap: 0.75rem; margin-top: 1.5rem; flex-wrap: wrap; }

.btn-danger {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  background: #cc0000;
  color: #fff;
  border: 1px solid #cc0000;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  min-height: 2.75rem;
  line-height: 1.5;
}
.btn-danger:hover { background: #aa0000; border-color: #aa0000; }

/* --- My listings table -------------------------------------------- */

.my-listings { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin-top: 1.25rem; }
.my-listings th { text-align: left; font-weight: 600; padding: 0.5rem; border-bottom: 2px solid #e5e5e5; }
.my-listings td { padding: 0.5rem; border-bottom: 1px solid #f0f0f0; vertical-align: middle; }
.my-listings tr:last-child td { border-bottom: none; }

/* --- Photos ------------------------------------------------------- */

.listing-photo { margin: 1rem 0; text-align: center; }
.listing-photo img { max-width: 100%; height: auto; border-radius: 4px; display: block; margin: 0 auto; }

.listing-thumb { display: block; margin-bottom: 0.75rem; }
.listing-thumb img { width: 100%; height: auto; max-height: 200px; object-fit: cover; border-radius: 4px; display: block; }

.hint { font-size: 0.85rem; color: #777; margin: 0.25rem 0 0 0; }

.flash-error {
  background: #fff3cd;
  border: 1px solid #ffc107;
  color: #856404;
  padding: 0.75rem 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.search-form {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0;
  max-width: 500px;
}
.search-form input[type=search] {
  flex: 1;
}
