/* Marketplace additions: country chooser, listing cards, seller dashboard,
   pricing and chat. */

.nav-sell {
  color: var(--accent-ink);
  background: var(--accent);
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border-bottom: 0 !important;
}
.nav-sell:hover { color: var(--accent-ink); filter: brightness(1.06); }

.country-picker {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex: 0 1 10.5rem;
}
.country-picker select {
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 0.4rem 0.45rem;
  font: inherit;
  font-size: 0.78rem;
}
.country-picker button {
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  border-radius: 8px;
  padding: 0.4rem 0.55rem;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.75fr);
  gap: 2rem;
  align-items: center;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.2rem; }
.hero-side {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem;
  box-shadow: var(--shadow);
}
.hero-side h2 { font-size: 1.05rem; }
.hero-side .country-picker { flex: 1 1 auto; margin: 0.8rem 0; }
.hero-price {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  border-top: 1px solid var(--line);
  padding-top: 0.8rem;
  margin-top: 0.8rem;
}
.hero-price strong { font-size: 1.4rem; letter-spacing: -0.03em; }
.hero-price span { color: var(--muted); font-size: 0.8rem; }

.listing-grid { align-items: stretch; }
.listing-card { overflow: hidden; }
.listing-card-media { background: var(--surface-2); }
.listing-media {
  aspect-ratio: 4 / 3;
  width: 100%;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.listing-media img { width: 100%; height: 100%; object-fit: cover; }
.listing-media--large { aspect-ratio: 1 / 0.82; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.listing-media--placeholder {
  background:
    radial-gradient(circle at 25% 25%, color-mix(in srgb, var(--accent) 55%, transparent), transparent 55%),
    linear-gradient(135deg, var(--surface-2), color-mix(in srgb, var(--accent) 18%, var(--surface)));
}
.listing-media--placeholder span { font-size: 3rem; font-weight: 800; color: var(--accent); }
.listing-card .card-body { gap: 0.42rem; }
.listing-country { font-size: 0.73rem; color: var(--muted); font-weight: 700; }
.listing-price { font-size: 1.18rem; font-weight: 800; letter-spacing: -0.03em; margin: 0.1rem 0; }
.listing-price--large { font-size: 1.8rem; margin: 0.25rem 0 0.1rem; }
.listing-meta { font-size: 0.8rem; color: var(--muted); margin: 0 0 0.25rem; }
.badges { display: inline-flex; flex-wrap: wrap; gap: 0.25rem; }
.badge {
  display: inline-block;
  font-size: 0.67rem;
  line-height: 1.5;
  font-weight: 800;
  padding: 0 0.4rem;
  border-radius: 999px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.badge-new { background: color-mix(in srgb, var(--accent) 18%, var(--surface)); color: var(--accent); }
.badge-featured { background: color-mix(in srgb, var(--accent) 18%, var(--surface)); color: var(--text); }
.badge-spotlight { background: var(--accent); color: var(--accent-ink); }
.badge-verified { background: #1d7a4c; color: #fff; }
.badge-warn { background: #8a5b00; color: #fff; }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { filter: brightness(1.06); }
.btn-soft { background: var(--surface-2); color: var(--text); border-color: var(--line); }
.btn-soft:disabled { opacity: 0.6; cursor: not-allowed; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

.share-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin: 0.8rem 0;
}
.share-link { font-size: 0.75rem; font-weight: 700; color: var(--muted); text-decoration: none; }
.share-link:hover { color: var(--accent); }
.share-bar--compact { margin: 0.35rem 0; }

.description { margin: 1.1rem 0; color: var(--text); }
.description p { margin: 0 0 0.8rem; }
.seller-line { font-size: 0.9rem; margin: 0.4rem 0 0.7rem; }
.item-actions { gap: 0.5rem; flex-wrap: wrap; }
.chat-start { margin-top: 1.5rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.chat-start h2 { font-size: 1.2rem; }
.report-box { margin-top: 1.2rem; border-top: 1px solid var(--line); padding-top: 0.9rem; }
.report-box summary { cursor: pointer; color: var(--muted); font-size: 0.82rem; }
.report-box .form-card { margin-top: 0.7rem; }

.form-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem;
  box-shadow: var(--shadow);
}
.form-compact { padding: 0.9rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.form-card label { display: flex; flex-direction: column; gap: 0.28rem; font-size: 0.82rem; font-weight: 700; }
.form-card input,
.form-card textarea,
.form-card select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  padding: 0.55rem 0.65rem;
}
.form-card textarea { resize: vertical; line-height: 1.45; }
.form-card input:focus,
.form-card textarea:focus,
.form-card select:focus { outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 1px; }
.form-actions { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.form-note { font-size: 0.76rem; color: var(--muted); }
.form-error { min-height: 1.2rem; margin: 0; font-size: 0.8rem; color: #b42318; }
.checkline { flex-direction: row !important; align-items: flex-start; gap: 0.55rem !important; font-weight: 400 !important; }
.checkline input { width: auto; margin-top: 0.2rem; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sell-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.7fr); gap: 1.3rem; align-items: start; }
.sell-aside { display: flex; flex-direction: column; gap: 0.9rem; }
.plan-card { padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.plan-card--soft { background: var(--surface-2); }
.plan-price { margin: 0.25rem 0 0.2rem; font-size: 2.1rem; font-weight: 800; letter-spacing: -0.04em; }
.plan-price span { font-size: 0.85rem; color: var(--muted); font-weight: 600; }
.check-list { margin: 0.7rem 0 0; padding-left: 1.1rem; color: var(--muted); font-size: 0.84rem; }
.check-list li { margin-bottom: 0.25rem; }

.filter-bar {
  display: flex;
  align-items: end;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin: 0.9rem 0 1.3rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.filter-bar label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.72rem; font-weight: 700; color: var(--muted); }
.filter-bar input,
.filter-bar select {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  padding: 0.45rem 0.55rem;
  font: inherit;
  font-size: 0.82rem;
}
.filter-bar input { min-width: 12rem; }
.browse-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.empty-state {
  margin: 1rem 0;
  padding: 1.5rem 1rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  text-align: center;
  color: var(--muted);
  background: var(--surface);
}
.empty-state p { max-width: 38rem; margin: 0.25rem auto 0.8rem; }
.notice {
  margin: 0.8rem 0 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid color-mix(in srgb, var(--accent) 50%, var(--line));
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  font-size: 0.84rem;
}
.seller-cta { padding-top: 1rem; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.8rem; }
.step { padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.step > span { font-size: 0.72rem; font-weight: 800; color: var(--accent); letter-spacing: 0.08em; }
.step h3 { font-size: 1rem; margin: 0.35rem 0 0.25rem; }
.step p { font-size: 0.82rem; color: var(--muted); margin: 0; }
.center { text-align: center; margin-top: 1rem; }

.pricing-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 1rem; margin-top: 1.2rem; align-items: start; }
.price-card { padding: 1.2rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.price-card--primary { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: var(--shadow); }
.price-card h2 { font-size: 1.05rem; margin: 0; }
.price-card .card-flags { align-items: baseline; }
.addon-stack { display: grid; gap: 0.7rem; }
.pricing-faq { padding-top: 1.6rem; }

.plan-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 7%, var(--surface));
}
.plan-banner p { margin: 0.15rem 0 0; color: var(--muted); font-size: 0.82rem; }
.plan-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.dashboard-listings { display: flex; flex-direction: column; gap: 0.7rem; }
.dashboard-listing {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.dashboard-thumb { width: 8rem; flex: 0 0 8rem; }
.dashboard-thumb .listing-media { aspect-ratio: 4 / 3; border-radius: 8px; }
.dashboard-listing-main { flex: 1; min-width: 0; }
.dashboard-listing-main h3 { font-size: 0.98rem; margin: 0.2rem 0; overflow-wrap: anywhere; }
.dashboard-actions, .addon-row { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.4rem; }
.addon-row .btn { font-size: 0.68rem; padding: 0.35rem 0.5rem; }
.status { font-size: 0.68rem; font-weight: 800; padding: 0.1rem 0.4rem; border-radius: 999px; text-transform: uppercase; }
.status-active { background: #d9f5e4; color: #145a36; }
.status-pending { background: #fff0cf; color: #704600; }
.status-paused, .status-sold, .status-removed { background: var(--surface-2); color: var(--muted); }
.status-review { background: #fde2e1; color: #8c1d18; }

.chat-inbox { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.chat-inbox-row { display: flex; align-items: center; gap: 0.7rem; padding: 0.75rem 0.9rem; text-decoration: none; border-bottom: 1px solid var(--line); }
.chat-inbox-row:last-child { border-bottom: 0; }
.chat-inbox-row:hover { background: var(--surface-2); }
.chat-inbox-avatar { width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--surface-2); color: var(--accent); flex: 0 0 auto; }
.chat-inbox-copy { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.chat-inbox-copy strong { font-size: 0.84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-inbox-copy span { font-size: 0.76rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.chat-page .chat-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.chat-box { margin-top: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.chat-messages { height: min(55vh, 30rem); overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 0.7rem; }
.chat-message { display: flex; flex-direction: column; max-width: 82%; }
.chat-message--seller { align-self: flex-end; align-items: flex-end; }
.chat-message--buyer { align-self: flex-start; }
.chat-bubble { padding: 0.55rem 0.75rem; border-radius: 13px; background: var(--surface-2); font-size: 0.9rem; overflow-wrap: anywhere; }
.chat-message--seller .chat-bubble { background: var(--accent); color: var(--accent-ink); }
.chat-time { font-size: 0.68rem; color: var(--muted); margin-top: 0.15rem; }
.chat-form { padding: 0.8rem; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 0.5rem; }
.chat-form textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; padding: 0.55rem; resize: vertical; }
.chat-form .btn { align-self: flex-end; }
.chat-page .fineprint { max-width: 50rem; }

@media (max-width: 900px) {
  .header-inner { flex-wrap: wrap; gap: 0.6rem; }
  .header-inner .search { order: 3; flex-basis: 100%; max-width: none; }
  .country-picker { flex-basis: 8rem; }
  .hero-grid, .sell-layout, .pricing-grid { grid-template-columns: 1fr; }
  .hero-side { max-width: 34rem; }
  .steps { grid-template-columns: 1fr; }
  .dashboard-listing { flex-direction: column; }
  .dashboard-thumb { width: 100%; flex-basis: auto; max-width: 11rem; }
}
@media (max-width: 600px) {
  .nav { gap: 0.55rem; flex-wrap: wrap; }
  .nav-link { font-size: 0.8rem; }
  .nav-sell { padding: 0.3rem 0.55rem; }
  .country-picker { flex-basis: 100%; }
  .country-picker select { font-size: 0.82rem; }
  .form-grid { grid-template-columns: 1fr; }
  .hero-inner { padding-top: 2rem; }
  .hero h1 { font-size: 2.25rem; }
  .filter-bar input { min-width: 0; width: 100%; }
  .filter-bar label { flex: 1 1 100%; }
  .share-bar .share-link { font-size: 0.68rem; }
}
