/* ===================== NAV ===================== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 12, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.5px;
  color: var(--fg-primary);
  text-decoration: none;
}

.nav-brand:hover { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-link {
  color: var(--fg-secondary);
  text-decoration: none;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 6px;
  transition: color 0.15s;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
}

.nav-link:hover { color: var(--fg-primary); }

.btn-ghost {
  color: var(--fg-secondary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-family: var(--font-body);
  text-decoration: none;
}
.btn-ghost:hover { color: var(--fg-primary); }

/* ===================== BUTTONS ===================== */
.btn-accent {
  display: inline-block;
  padding: 12px 28px;
  background: var(--accent);
  color: #0a0a0c;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  border-radius: var(--radius);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s;
  white-space: nowrap;
}
.btn-accent:hover { opacity: 0.88; }

.btn-accent-sm {
  display: inline-block;
  padding: 8px 18px;
  background: var(--accent);
  color: #0a0a0c;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  border-radius: var(--radius);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s;
  white-space: nowrap;
}
.btn-accent-sm:hover { opacity: 0.88; }

.btn-outline {
  display: inline-block;
  padding: 12px 28px;
  background: transparent;
  color: var(--fg-primary);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  border-radius: var(--radius);
  text-decoration: none;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 0.15s;
  white-space: nowrap;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.btn-full { width: 100%; text-align: center; display: block; }

/* ===================== HERO CTA ===================== */
.hero-cta-row {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

/* ===================== LAYOUT ===================== */
.page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px;
}

.page-container--narrow {
  max-width: 720px;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}

.page-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
  letter-spacing: -0.5px;
}

.page-sub {
  color: var(--fg-secondary);
  font-size: 16px;
  margin-top: 8px;
  margin-bottom: 32px;
  max-width: 580px;
}

/* ===================== AUTH ===================== */
.auth-page {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: calc(100vh - 60px);
  padding: 60px 24px;
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  width: 100%;
  max-width: 440px;
}

.auth-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.auth-sub {
  color: var(--fg-secondary);
  font-size: 15px;
  margin-bottom: 28px;
}

.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-switch { margin-top: 20px; font-size: 14px; color: var(--fg-secondary); text-align: center; }
.auth-switch a { color: var(--accent); text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }

/* ===================== FORMS ===================== */
.field-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-secondary);
  margin-bottom: 5px;
  margin-top: 4px;
}
.field-hint { color: var(--fg-muted); font-weight: 400; }
.required { color: var(--accent); }

.field-input {
  display: block;
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--fg-primary);
  font-family: var(--font-body);
  font-size: 15px;
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.15s;
}
.field-input:focus { border-color: rgba(200,165,90,0.5); }
.field-input::placeholder { color: var(--fg-muted); }

.field-textarea { resize: vertical; min-height: 100px; }

.field-select { appearance: none; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field-col { display: flex; flex-direction: column; }
.field-col--sm { max-width: 120px; }

.field-prefix-wrap { position: relative; }
.field-prefix {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--fg-secondary);
  font-size: 15px;
  pointer-events: none;
}
.field-with-prefix { padding-left: 28px !important; }

/* ===================== ALERTS ===================== */
.alert-error {
  background: rgba(196,92,74,0.12);
  border: 1px solid rgba(196,92,74,0.3);
  border-radius: var(--radius);
  padding: 12px 16px;
  color: #e8a090;
  font-size: 14px;
  margin-bottom: 16px;
}

.alert-info {
  background: var(--accent-dim);
  border: 1px solid rgba(200,165,90,0.2);
  border-radius: var(--radius);
  padding: 12px 16px;
  color: var(--accent);
  font-size: 14px;
  margin-bottom: 16px;
}

.alert-success {
  background: rgba(72,160,100,0.12);
  border: 1px solid rgba(72,160,100,0.3);
  border-radius: var(--radius);
  padding: 12px 16px;
  color: #7ed4a0;
  font-size: 14px;
  margin-bottom: 16px;
}

/* ===================== LISTINGS GRID ===================== */
.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.listing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--fg-primary);
  transition: border-color 0.15s, transform 0.15s;
  display: block;
}
.listing-card:hover { border-color: rgba(200,165,90,0.35); transform: translateY(-2px); }
.listing-card--inactive { opacity: 0.6; }

.listing-photo {
  aspect-ratio: 4/3;
  background: var(--bg-secondary);
  overflow: hidden;
  position: relative;
}
.listing-photo img { width: 100%; height: 100%; object-fit: cover; }
.listing-photo-placeholder { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 40px; opacity: 0.4; }

.listing-status-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.listing-status-badge--active { background: rgba(72,160,100,0.2); color: #7ed4a0; }
.listing-status-badge--sold { background: rgba(196,92,74,0.2); color: #e8a090; }
.listing-status-badge--cancelled { background: rgba(100,100,100,0.2); color: var(--fg-muted); }

.listing-card-body { padding: 16px; }

.listing-meta {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.listing-blade-type, .listing-blade-len {
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(200,165,90,0.15);
  padding: 2px 8px;
  border-radius: 100px;
}

.listing-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.3;
}

.listing-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.listing-price {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
}

.listing-seller {
  font-size: 13px;
  color: var(--fg-muted);
}

/* ===================== LISTING DETAIL ===================== */
.listing-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.listing-gallery { position: sticky; top: 80px; }

.gallery-main {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  aspect-ratio: 4/3;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-placeholder { display: flex; align-items: center; justify-content: center; aspect-ratio: 4/3; background: var(--bg-card); border-radius: var(--radius); font-size: 80px; opacity: 0.3; }

.gallery-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  overflow-x: auto;
}
.gallery-thumb {
  width: 64px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0.55;
  border: 2px solid transparent;
  flex-shrink: 0;
  transition: opacity 0.15s;
}
.gallery-thumb.active, .gallery-thumb:hover { opacity: 1; border-color: var(--accent); }

.listing-info { display: flex; flex-direction: column; gap: 16px; }

.listing-detail-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.15;
}

.listing-detail-price {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  color: var(--accent);
}

.listing-seller-line { color: var(--fg-secondary); font-size: 14px; }

.listing-description {
  color: var(--fg-secondary);
  font-size: 15px;
  line-height: 1.7;
  padding: 20px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.escrow-callout {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 20px;
  background: var(--accent-dim);
  border: 1px solid rgba(200,165,90,0.2);
  border-radius: var(--radius);
  font-size: 14px;
}
.escrow-callout-icon { font-size: 22px; flex-shrink: 0; }
.escrow-callout strong { display: block; color: var(--accent); margin-bottom: 4px; }
.escrow-callout p { color: var(--fg-secondary); margin: 0; }

.checkout-accordion {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.checkout-accordion-title {
  padding: 16px 20px;
  font-family: var(--font-display);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  color: var(--fg-primary);
}
.checkout-form {
  padding: 0 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.checkout-note {
  font-size: 12px;
  color: var(--fg-muted);
  text-align: center;
  margin-top: 8px;
}

/* ===================== LISTING FORM ===================== */
.listing-form { display: flex; flex-direction: column; gap: 0; }

.form-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.form-section-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}
.form-section-sub { color: var(--fg-secondary); font-size: 14px; margin-bottom: 4px; }

.photo-upload-label { cursor: pointer; }
.photo-input { display: none; }
.photo-upload-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 32px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s;
}
.photo-upload-area:hover { border-color: rgba(200,165,90,0.4); }
.photo-upload-icon { font-size: 28px; }
.photo-upload-text { color: var(--fg-secondary); font-size: 14px; }

.photo-preview-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.photo-thumb {
  position: relative;
  width: 80px;
  height: 60px;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid var(--border);
}
.photo-thumb--cover { border-color: var(--accent); }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.photo-thumb-label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  text-align: center;
  font-size: 10px;
  font-weight: 600;
  background: rgba(0,0,0,0.6);
  color: var(--fg-primary);
  padding: 2px 0;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
}

/* ===================== EMPTY STATE ===================== */
.empty-state {
  text-align: center;
  padding: 80px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.empty-icon { font-size: 48px; opacity: 0.5; }
.empty-title { font-family: var(--font-display); font-size: 22px; font-weight: 600; }
.empty-sub { color: var(--fg-secondary); font-size: 15px; margin-bottom: 8px; }

/* ===================== ESCROW STATUS ===================== */
.escrow-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.escrow-status--pending_payment { background: rgba(100,100,100,0.15); color: var(--fg-muted); }
.escrow-status--payment_received { background: var(--accent-dim); color: var(--accent); }
.escrow-status--shipped { background: rgba(72,120,200,0.12); color: #90b4e8; }
.escrow-status--delivered { background: rgba(72,160,100,0.12); color: #7ed4a0; }
.escrow-status--released { background: rgba(72,160,100,0.2); color: #7ed4a0; }
.escrow-status--disputed { background: rgba(196,92,74,0.12); color: #e8a090; }

/* ===================== TRANSACTION LIST ===================== */
.transaction-list { display: flex; flex-direction: column; gap: 0; }
.transaction-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--fg-primary);
  transition: background 0.15s;
}
.transaction-row:first-child { border-top: 1px solid var(--border); }
.transaction-row:hover { background: var(--bg-secondary); }

.transaction-photo { width: 56px; height: 44px; border-radius: 8px; overflow: hidden; background: var(--bg-card); flex-shrink: 0; }
.transaction-photo img { width: 100%; height: 100%; object-fit: cover; }
.transaction-photo-placeholder { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 18px; opacity: 0.4; }

.transaction-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.transaction-title { font-weight: 500; font-size: 15px; }
.transaction-meta { font-size: 13px; color: var(--fg-muted); }

.transaction-role { font-weight: 600; }
.transaction-role--buyer { color: #90b4e8; }
.transaction-role--seller { color: var(--accent); }

.transaction-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.transaction-amount { font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--accent); }

/* ===================== ESCROW DETAIL ===================== */
.escrow-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}
.escrow-detail-label { font-size: 13px; color: var(--fg-muted); margin-bottom: 4px; }
.escrow-detail-title { font-family: var(--font-display); font-size: 28px; font-weight: 700; letter-spacing: -0.5px; }
.escrow-detail-meta { font-size: 14px; color: var(--fg-secondary); margin-top: 4px; }
.escrow-role { color: var(--accent); font-weight: 600; }

.escrow-amount-badge {
  background: var(--accent-dim);
  border: 1px solid rgba(200,165,90,0.25);
  border-radius: var(--radius);
  padding: 12px 24px;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}

.escrow-timeline {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 32px;
  overflow-x: auto;
  padding: 16px 0;
}
.timeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
  position: relative;
}
.timeline-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--border);
  z-index: 0;
}
.timeline-step.done::after, .timeline-step.active::after { background: var(--accent); }

.timeline-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg-primary);
  position: relative;
  z-index: 1;
}
.timeline-step.done .timeline-dot { background: var(--accent); border-color: var(--accent); }
.timeline-step.active .timeline-dot { border-color: var(--accent); background: var(--accent-dim); box-shadow: 0 0 0 4px var(--accent-glow); }

.timeline-label {
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.timeline-step.done .timeline-label, .timeline-step.active .timeline-label { color: var(--fg-primary); }

.escrow-cards { display: flex; flex-direction: column; gap: 16px; }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.card-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 16px;
}
.card-body { color: var(--fg-secondary); font-size: 15px; margin-bottom: 16px; line-height: 1.6; }
.card-note { color: var(--fg-muted); font-size: 14px; font-style: italic; }

.inline-form { display: flex; flex-direction: column; gap: 10px; }

.tracking-info {
  background: var(--bg-secondary);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 16px;
}
.tracking-label { font-size: 12px; color: var(--fg-muted); margin-bottom: 4px; }
.tracking-value { font-size: 15px; }

.confirm-btn { width: 100%; }

.address-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.address-label { font-size: 12px; font-weight: 600; color: var(--fg-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.address-block { font-style: normal; font-size: 14px; line-height: 1.7; color: var(--fg-secondary); }

.parties-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.party-label { font-size: 12px; font-weight: 600; color: var(--fg-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.party-name { font-size: 16px; font-weight: 500; }
.party-email { font-size: 13px; color: var(--fg-secondary); }

.back-link { margin-top: 32px; display: block; }
.back-link a { color: var(--fg-secondary); text-decoration: none; font-size: 14px; }
.back-link a:hover { color: var(--accent); }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {
  .listing-detail { grid-template-columns: 1fr; gap: 24px; }
  .listing-gallery { position: static; }
  .field-row { grid-template-columns: 1fr; }
  .field-col--sm { max-width: none; }
  .address-cols, .parties-row { grid-template-columns: 1fr; }
  .escrow-amount-badge { font-size: 22px; }
  .escrow-detail-title { font-size: 22px; }
  .listing-detail-title { font-size: 24px; }
  .listing-detail-price { font-size: 28px; }
  .nav-links { gap: 4px; }
}
