/* Marketplace-specific styles - extends global style.css */

/* BREADCRUMB */
.breadcrumb {
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-dim);
}

.breadcrumb a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s ease;
}

.breadcrumb a:hover { color: var(--text); }

.breadcrumb .sep { margin: 0 0.5rem; color: var(--border); }

/* TOOLBAR */
.toolbar {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-md);
  padding: var(--space-sm);
  /* Pinned under the compact site header (Gene: search/sort stay put, the
   * catalog scrolls). 3.2rem clears the compacted header; solid bg so
   * listings don't ghost through. */
  position: sticky;
  top: 9.2rem;
  z-index: 5;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.search-input {
  flex: 1 1 280px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.search-input:hover { border-color: var(--accent); }
.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
}

.toolbar select {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
}

.toolbar select { transition: border-color 0.15s, box-shadow 0.15s; }
.toolbar select:hover { border-color: var(--accent); }
.toolbar select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }

.result-count {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-left: auto;
}

/* MARKETPLACE LAYOUT */
.market-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: var(--space-lg);
}

@media (max-width: 900px) {
  .market-layout { grid-template-columns: 1fr; }
  .filter-panel { order: 2; }
}

.filter-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  align-self: start;
  position: sticky;
  /* Clear the compacted sticky header + the sticky toolbar (was 5rem, which
   * tucked the panel half-under the 155px full-height header). */
  top: 13.5rem;
  max-height: calc(100vh - 14.5rem);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.filter-panel::-webkit-scrollbar { width: 8px; }
.filter-panel::-webkit-scrollbar-track { background: transparent; }
.filter-panel::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.filter-panel::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

@media (max-width: 900px) {
  .filter-panel {
    position: static;
    max-height: none;
    overflow-y: visible;
  }
  .toolbar { position: static; }
}

.filter-group { margin-bottom: var(--space-md); }
.filter-group:last-child { margin-bottom: 0; }

.filter-group h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  margin-bottom: var(--space-xs);
  font-weight: 600;
}

.filter-group ul { list-style: none; }

.filter-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0;
  font-size: 0.9rem;
  cursor: pointer;
  color: var(--text);
}

.filter-group label:hover { color: var(--accent); }

.filter-group input[type="checkbox"] {
  cursor: pointer;
  accent-color: var(--accent);
}

.filter-group .count {
  margin-left: auto;
  color: var(--text-dim);
  font-size: 0.8rem;
}

.price-range {
  display: flex;
  gap: 0.5rem;
}

.price-range input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-family: inherit;
  width: 100%;
  min-width: 0;
}

.price-range input:focus { outline: none; border-color: var(--accent); }

.filter-clear {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  width: 100%;
  margin-top: var(--space-sm);
}

.filter-clear:hover { color: var(--text); border-color: var(--text-dim); }

/* LISTINGS GRID */
.listings-area {
  min-width: 0;
}

.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-md);
}

.listing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.listing-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.listing-photo {
  aspect-ratio: 4 / 3;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.listing-photo .badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  backdrop-filter: blur(4px);
}

.listing-body {
  padding: var(--space-sm);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.listing-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  line-height: 1.3;
}

.listing-meta {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 0.3rem;
}

.listing-price {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: var(--space-xs);
}

.listing-price .amount {
  color: var(--accent);
  font-weight: 700;
  font-size: 1.05rem;
}

.listing-price .type {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.listing-price .amount .per-unit-tag {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dim);
  margin-left: 0.15rem;
}

.listing-footer {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 0.4rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--border);
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--space-xl) var(--space-md);
  color: var(--text-dim);
}

.empty-state h3 {
  color: var(--text);
  margin-bottom: var(--space-xs);
}

/* LISTING DETAIL */
.listing-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  margin-top: var(--space-md);
}

@media (max-width: 800px) {
  .listing-detail { grid-template-columns: 1fr; }
}

.detail-photos { }

.detail-main-photo {
  aspect-ratio: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-sm);
}

.thumb-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: var(--space-xs);
}

.thumb {
  aspect-ratio: 1;
  background-size: cover;
  background-position: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.15s ease;
}

.thumb:hover, .thumb.active { opacity: 1; }
.thumb.active { border-color: var(--accent); }

.detail-info h1 {
  font-size: 1.6rem;
  margin-bottom: var(--space-xs);
  line-height: 1.2;
}

.detail-price {
  font-size: 1.8rem;
  color: var(--accent);
  font-weight: 700;
  margin: var(--space-sm) 0;
}

.detail-price .type-tag {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.2rem 0.6rem;
  font-size: 0.7rem;
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 4px;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.detail-price .per-unit-tag {
  font-size: 1rem;
  color: var(--text-dim);
  font-weight: 600;
  margin-left: 0.2rem;
}

/* Bulk / by-weight quantity selector on the listing detail. */
.qty-box {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-md);
  margin: var(--space-sm) 0 var(--space-md);
  background: var(--surface-2, rgba(255,255,255,0.03));
}
.qty-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
  font-size: 0.9rem;
  color: var(--text-dim);
  margin-bottom: var(--space-sm);
}
.qty-meta strong { color: var(--text); }
.qty-pick {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.9rem;
  font-weight: 600;
}
.qty-pick input {
  width: 130px;
  padding: 0.5rem 0.6rem;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
}
.qty-total {
  margin-top: var(--space-sm);
  font-size: 1.1rem;
}
.qty-total strong { color: var(--accent); }
.qty-box .qty-contact { margin-top: var(--space-sm); }

.specs-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-md) 0;
  font-size: 0.95rem;
}

.specs-table tr {
  border-bottom: 1px solid var(--border);
}

.specs-table td {
  padding: 0.5rem 0;
}

.specs-table td:first-child {
  color: var(--text-dim);
  width: 40%;
}

.specs-table td:last-child {
  color: var(--text);
  font-weight: 500;
}

.detail-description {
  margin: var(--space-md) 0;
  color: var(--text);
  line-height: 1.7;
}

.seller-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  margin-top: var(--space-md);
}

.seller-card h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  margin-bottom: var(--space-xs);
}

.seller-name {
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.seller-location {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: var(--space-sm);
}

.contact-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: background 0.15s ease;
}

.contact-btn:hover { background: var(--accent-hover); }

.disclosure-note {
  margin-top: var(--space-sm);
  padding: var(--space-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.5;
}

/* ===========================================
   MOBILE RESPONSIVE
   =========================================== */

/* Header: collapse to stacked layout on narrow screens */
@media (max-width: 768px) {
  /* Header mobile rules intentionally removed — the header is governed solely
   * by style.css (@media max-width:600px) so every page shares one definition.
   * Keeping per-page header rules here is what made mobile headers inconsistent. */

  /* Breadcrumb */
  .breadcrumb { font-size: 0.8rem; flex-wrap: wrap; }
  .breadcrumb .sep { margin: 0 0.3rem; }

  /* Hero */
  .hero h1 { font-size: 1.4rem; }
  .hero .lede { font-size: 0.9rem; }
  .hero { padding: var(--space-md); }

  /* Toolbar */
  .toolbar {
    flex-direction: column;
    gap: var(--space-xs);
    padding: var(--space-xs);
  }
  .search-input { flex: 1 1 100%; font-size: 0.9rem; }
  .toolbar select { width: 100%; }
  .result-count { margin-left: 0; text-align: center; }

  /* Type scroll chips */
  .type-scroll button { font-size: 0.8rem !important; padding: 0.35rem 0.75rem !important; }

  /* Section label */
  .section-label { font-size: 2.8rem !important; }

  /* Listing grid: 1 column on phones */
  .listings-grid {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  /* Listing detail */
  .detail-info h1 { font-size: 1.25rem; }
  .detail-price { font-size: 1.4rem; }

  /* Post form */
  .form-row { grid-template-columns: 1fr; }

  /* Services grid */
  .services-grid { grid-template-columns: 1fr; }

  /* Contact modal */
  .contact-modal { padding: var(--space-sm); }
}

/* Small phones */
@media (max-width: 480px) {
  .container { padding: 0 var(--space-sm); }
  .hero h1 { font-size: 1.2rem; }
  .hero .lede { font-size: 0.85rem; }
  .section-label { font-size: 2rem !important; }
  .listing-title { font-size: 0.9rem; }
  .listing-price .amount { font-size: 0.95rem; }
  .breadcrumb { font-size: 0.75rem; }
}

/* POST FORM */
.post-form {
  max-width: 720px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: var(--space-md);
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 0.3rem;
  font-weight: 500;
}

.form-group .help {
  display: block;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 0.25rem;
}

.required-mark {
  color: #f87171;
  margin-left: 0.2rem;
}

.form-group input:invalid:not(:placeholder-shown),
.form-group textarea:invalid:not(:placeholder-shown) {
  border-color: #f87171;
}

.form-group .inline-check {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-dim);
  cursor: pointer;
  font-weight: 400;
}

.form-group .inline-check input[type="checkbox"] {
  width: auto;
  margin: 0;
  cursor: pointer;
}

.form-group input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="search"],
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

/* Hover and focus get the same 2px copper ring as the tiles, so form
 * fields read as interactive surfaces and feel consistent with the
 * rest of the site. Owner direction 2026-05-22. */
.form-group input[type="text"]:hover,
.form-group input[type="number"]:hover,
.form-group input[type="email"]:hover,
.form-group input[type="tel"]:hover,
.form-group input[type="search"]:hover,
.form-group select:hover,
.form-group textarea:hover {
  border-color: var(--accent);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
}

/* Native file input — give the actual "Choose file" button the same
 * treatment as a CTA so it doesn't read as browser-default ugly OS chrome. */
.form-group input[type="file"] {
  display: block;
  width: 100%;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-dim);
  cursor: pointer;
}
.form-group input[type="file"]::file-selector-button {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  margin-right: var(--space-sm);
  transition: background 0.15s, box-shadow 0.15s;
}
.form-group input[type="file"]::file-selector-button:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 0 2px var(--accent);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}

@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
}

.photo-upload {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  text-align: center;
  color: var(--text-dim);
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.photo-upload:hover {
  border-color: var(--accent);
  color: var(--text);
}

.form-actions {
  display: flex;
  gap: var(--space-sm);
  justify-content: flex-end;
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border);
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: inherit;
  cursor: pointer;
}

/* SERVICES PAGE */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.service-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.service-photo {
  position: relative;
  aspect-ratio: 16 / 9;
  border-bottom: 1px solid var(--border);
}

.service-category-badge {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  background: rgba(20, 20, 28, 0.85);
  color: var(--accent);
  border: 1px solid var(--accent);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.service-body {
  padding: var(--space-sm) var(--space-md) var(--space-md);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.service-name {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.3;
}

.service-provider {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.service-description {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.5;
  flex: 1;
}

.service-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-top: auto;
}

.service-price {
  color: var(--accent);
  font-weight: 600;
}

.service-contact {
  text-decoration: none;
  text-align: center;
  margin-top: 0.5rem;
}

.services-cta {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  text-align: center;
}

.services-cta h3 { margin-bottom: 0.5rem; }
.services-cta p {
  color: var(--text-dim);
  max-width: 50ch;
  margin: 0 auto var(--space-sm);
}
.services-cta .cta { text-decoration: none; display: inline-block; }

/* Service cards are now links to the detail page. */
.service-card { text-decoration: none; color: inherit; cursor: pointer; }
.service-contact {
  text-decoration: none;
  text-align: center;
  margin-top: 0.5rem;
  pointer-events: none; /* whole card is the link */
}

/* ===== SERVICE DETAIL PAGE ===== */
.service-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: var(--space-lg);
  margin-top: var(--space-md);
  align-items: start;
}
@media (max-width: 800px) {
  .service-detail { grid-template-columns: 1fr; }
}

.service-detail-hero {
  position: relative;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 240px;
}

.service-detail-body { display: flex; flex-direction: column; gap: var(--space-sm); }

.service-detail-name {
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}
.service-detail-provider {
  color: var(--text-dim);
  font-size: 1rem;
}

.service-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-sm);
  margin: var(--space-xs) 0;
  padding: var(--space-sm) var(--space-md);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.service-fact dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  margin-bottom: 0.15rem;
}
.service-fact dd { margin: 0; font-weight: 600; }
.service-fact dd { color: var(--text); }
.service-facts .service-fact:first-child dd { color: var(--accent); }

.service-detail-desc { line-height: 1.6; }
.service-detail-desc p { margin: 0 0 0.8rem; }

.service-detail-contact {
  text-decoration: none;
  text-align: center;
  display: inline-block;
  align-self: flex-start;
  margin-top: var(--space-xs);
}
.service-detail-contact-note {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin: 0.4rem 0 0;
  max-width: 52ch;
}

/* Gallery (below the two-column hero/body) */
.service-gallery {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--space-sm);
  margin-top: var(--space-xs);
}
.service-gallery-item {
  aspect-ratio: 1 / 1;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.service-gallery-item:hover { border-color: var(--accent); transform: translateY(-2px); }

/* More from this provider */
.service-more {
  grid-column: 1 / -1;
  margin-top: var(--space-lg);
  border-top: 1px solid var(--border);
  padding-top: var(--space-md);
}
.service-more h2 { font-size: 1.2rem; margin: 0 0 var(--space-sm); }
.service-more-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-sm);
}
.service-more-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.service-more-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.service-more-thumb { aspect-ratio: 16 / 9; border-bottom: 1px solid var(--border); }
.service-more-body { padding: var(--space-sm); }
.service-more-name { font-weight: 600; font-size: 0.95rem; line-height: 1.3; }
.service-more-cat { font-size: 0.78rem; color: var(--text-dim); margin-top: 0.2rem; }

.btn-secondary:hover { border-color: var(--text-dim); }

.notice {
  padding: var(--space-sm) var(--space-md);
  background: var(--accent-dim);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.9rem;
  margin-bottom: var(--space-md);
}

.notice strong { color: var(--accent); }

.expired-banner {
  grid-column: 1 / -1;
  padding: var(--space-sm) var(--space-md);
  background: rgba(220, 38, 38, 0.12);
  border: 1px solid rgba(220, 38, 38, 0.45);
  border-radius: var(--radius);
  color: #fca5a5;
  margin-bottom: var(--space-md);
  font-size: 0.95rem;
}
.expired-banner strong { color: #fecaca; }

/* CONTACT SELLER MODAL */
.contact-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: var(--space-sm);
  overflow-y: auto;
}

.contact-modal {
  position: relative;
  width: 100%;
  max-width: 560px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-md) var(--space-lg);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  color: var(--text);
}

.contact-modal h3 {
  margin: 0 0 0.25rem 0;
  font-size: 1.25rem;
}

.contact-modal-sub {
  margin: 0 0 var(--space-md) 0;
  color: var(--text-dim);
  font-size: 0.9rem;
}
.contact-modal-sub strong { color: var(--text); }

.contact-modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  background: transparent;
  border: 0;
  color: var(--text-dim);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius);
}
.contact-modal-close:hover { color: var(--text); background: var(--bg); }

.contact-form label {
  display: block;
  margin-bottom: var(--space-sm);
  font-size: 0.9rem;
  color: var(--text-dim);
}

.contact-form label > span {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--text);
  font-weight: 500;
}
.contact-form label > span em {
  color: var(--text-dim);
  font-style: normal;
  font-weight: 400;
  font-size: 0.85em;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 0.55rem 0.75rem;
  font: inherit;
  font-size: 0.95rem;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.contact-form input:hover,
.contact-form textarea:hover {
  border-color: var(--accent);
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
}
.contact-form textarea { resize: vertical; min-height: 110px; }

.contact-form small {
  display: block;
  margin-top: 0.25rem;
  color: var(--text-dim);
  font-size: 0.8rem;
}

/* Honeypot — taken out of the layout AND visually hidden. The display:none
   alone tends to be enough to keep humans off them; we also guard server-side. */
.contact-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-modal-error {
  margin: var(--space-sm) 0;
  padding: 0.6rem 0.8rem;
  background: rgba(220, 38, 38, 0.12);
  border: 1px solid rgba(220, 38, 38, 0.45);
  border-radius: var(--radius);
  color: #fca5a5;
  font-size: 0.9rem;
}

.contact-modal-actions {
  display: flex;
  gap: var(--space-sm);
  justify-content: flex-end;
  margin-top: var(--space-sm);
}
.contact-modal-actions .btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.55rem 1rem;
  border-radius: var(--radius);
  cursor: pointer;
  font: inherit;
}
.contact-modal-actions .btn-secondary:hover { border-color: var(--text-dim); }
.contact-modal-actions button[type="submit"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.contact-modal-disclaimer {
  margin-top: var(--space-sm);
  color: var(--text-dim);
  font-size: 0.78rem;
  line-height: 1.5;
}

.contact-modal-success {
  text-align: center;
  padding: var(--space-sm) 0;
}
.contact-modal-success h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1.15rem;
  color: #6ee7b7;
}
.contact-modal-success p {
  color: var(--text-dim);
  margin-bottom: var(--space-md);
}

/* REPLY PAGE preview block */
.reply-preview {
  margin: var(--space-md) 0;
  padding: var(--space-sm) var(--space-md);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
}
.reply-preview h4 {
  margin: 0 0 0.4rem 0;
  font-size: 0.85rem;
  color: var(--text-dim);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.reply-preview-from {
  color: var(--text);
  font-weight: 500;
  margin-bottom: 0.4rem;
}
.reply-preview-body {
  color: var(--text-dim);
  white-space: pre-wrap;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Payment options block + P2P disclaimer — listing detail page */
.payment-options {
  margin: var(--space-md) 0;
  padding: var(--space-md);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.02);
}
.payment-options h4 {
  margin: 0 0 var(--space-sm);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.payment-row {
  display: flex;
  gap: var(--space-sm);
  align-items: baseline;
  padding: 0.25rem 0;
  font-size: 0.95rem;
}
.payment-row strong { min-width: 5.5rem; color: var(--text); }
.payment-row a { color: var(--accent); text-decoration: none; }
.payment-row a:hover { text-decoration: underline; }

.p2p-disclaimer {
  margin: var(--space-md) 0;
  padding: 0.6rem 0.8rem;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--text-dim);
  background: rgba(220, 170, 50, 0.06);
  border-left: 3px solid rgba(220, 170, 50, 0.5);
  border-radius: var(--radius);
}
.p2p-disclaimer span { margin-right: 0.3rem; }

/* Payment & contact fieldset on post + manage forms */
.payment-section {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-top: var(--space-md);
}
.payment-section > legend {
  padding: 0 var(--space-xs);
  font-weight: 600;
  color: var(--text);
}

/* Multi-image gallery editor on post + manage forms.
   Tiles are 120px square so a row of 5 fits comfortably on desktop and
   the gallery wraps cleanly on phones. The cover slot is implied by
   position (first tile) — no drag-to-reorder yet, sellers re-add to
   reorder. */
.photo-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}
.photo-tile {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
}
.photo-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Drag-to-reorder: tiles are draggable (cursor hint), dim while dragging,
   and show an accent ring on the tile the drop will land on. */
.photo-tile[draggable="true"] { cursor: grab; }
.photo-tile.dragging { opacity: 0.4; cursor: grabbing; }
.photo-tile.drag-over { outline: 2px solid var(--accent); outline-offset: -2px; }
.photo-tile img { pointer-events: none; } /* let drag events hit the tile, not the img */
.photo-tile-pending {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.03);
  border-style: dashed;
}
.photo-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  background: rgba(20, 20, 28, 0.85);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.02em;
}
.photo-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(20, 20, 28, 0.85);
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.photo-remove:hover {
  background: #c25450;
}

/* Post-success signup prompt card. Sits below the success notice and
   nudges the seller to convert their listing into a tracked account. */
.signup-prompt-card {
  margin-top: var(--space-md);
  padding: var(--space-md);
  border: 1px solid var(--accent);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(220, 170, 50, 0.06), rgba(220, 170, 50, 0.02));
}
.signup-prompt-card h3 {
  font-size: 1.1rem;
  color: var(--text);
}
.signup-prompt-card .cta {
  margin-right: var(--space-sm);
}

/* "From the store" panel on the listing detail page — shown when the
   seller has a storefront (Worker attaches store_slug/store_name). Matches
   the seller-card chrome so the right column reads as one stack. */
.store-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  margin-top: var(--space-md);
}
.store-panel h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  margin-bottom: var(--space-xs);
}
.store-panel-link {
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}
.store-panel-link:hover {
  text-decoration: underline;
}
