/* ─────────────────────────────────────────────
   base.css — Solo EV Marketplace shared styles
   ───────────────────────────────────────────── */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Variables ── */
:root {
  --navy:         #02457A;
  --navy2:        #013a6b;
  --blue:         #1a4a8a;
  --accent:       #02457A;
  --accent-hover: #013a6b;
  --bg:           #f1f6f8;
  --surface:      #ffffff;
  --border:       #d0dde5;
  --text:         #0d2240;
  --muted:        #6b7a94;
  --yellow:       #fec106;
  --yellow-hover: #e6ad00;
  --yellow-text:  #061A45;
  --green:        #1dab72;
  --red:          #e05252;
  --gen1:         #02457A;
  --gen2:         #1dab72;
  --gen3:         #0891b2;
  --gengt:        #b45309;
  --radius:       0px;
  --shadow:       0 2px 10px rgba(13,34,64,0.08);
  --shadow-hover: 0 6px 28px rgba(13,34,64,0.15);
  /* Override per page: --page-width and --topbar-height */
  --page-width:   940px;
  --topbar-height: 46px;
}

/* ── Body ── */
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body.auth-body { /* auth-body already covered by body defaults above */ }

/* ── Topbar ── */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 40px;
}
.topbar-inner {
  max-width: var(--page-width);
  margin: 0 auto;
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  gap: 6px;
}
.topbar-brand {
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--navy); text-decoration: none;
}
.topbar-auth {
  margin-left: auto;
  display: flex; align-items: center; gap: 14px; font-size: 13px;
}
.topbar-auth .auth-email { color: var(--text); font-weight: 500; }
.topbar-auth a, .topbar-auth button {
  color: var(--muted); text-decoration: none;
  background: none; border: none; cursor: pointer;
  font-family: 'Inter', sans-serif; font-size: 13px;
  transition: color 0.15s;
}
.topbar-auth a:hover, .topbar-auth button:hover { color: var(--navy); }

/* ── Breadcrumb bar ── */
.breadcrumb-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 40px;
}
.breadcrumb-inner {
  max-width: var(--page-width);
  margin: 0 auto;
  height: 40px; display: flex; align-items: center; gap: 8px;
}
.back-btn {
  display: flex; align-items: center; gap: 5px;
  color: var(--muted); text-decoration: none;
  font-size: 13px; font-weight: 500;
  transition: color 0.15s;
}
.back-btn:hover { color: var(--accent); }
.breadcrumbs { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.breadcrumbs a { color: var(--muted); text-decoration: none; transition: color 0.15s; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .sep { color: var(--border); }
.breadcrumbs .current {
  color: var(--text); font-weight: 500;
  max-width: 300px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ── Page header (navy banner) ── */
.page-header {
  background: var(--navy);
  padding: 32px 40px 28px;
}
.page-header-inner { max-width: var(--page-width); margin: 0 auto; }
.page-header-label {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(255,255,255,0.55); margin-bottom: 6px;
}
.page-header h1 {
  font-size: 22px; font-weight: 800; color: #fff; letter-spacing: -0.01em;
}
.page-header-email { font-size: 13px; color: rgba(255,255,255,0.6); margin-top: 4px; }

/* ── Main content area ── */
.main {
  width: 100%;
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 36px 0 60px;
}

/* ── Shared labels ── */
label {
  display: block;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 6px;
}
label .req { color: #e05252; margin-left: 2px; }

/* ── Loading / empty states ── */
.loading { text-align: center; padding: 40px; color: var(--muted); font-size: 14px; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-state p { font-size: 14px; margin-bottom: 20px; }


/* ════════════════════════════════════════════
   INDEX PAGE
   ════════════════════════════════════════════ */

.search-section {
  background: var(--navy);
  padding: 32px 40px 28px;
}
.search-inner { max-width: var(--page-width); margin: 0 auto; }

.search-label {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(255,255,255,0.55); margin-bottom: 14px;
}

.search-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.search-box { flex: 1; position: relative; }
.search-box svg {
  position: absolute; left: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--muted); pointer-events: none;
}
.search-box input[type="text"] {
  width: 100%; padding: 13px 14px 13px 52px;
  border: 1.5px solid rgba(255,255,255,0.15);
  font-family: 'Inter', sans-serif; font-size: 14px;
  background: rgba(255,255,255,0.07); color: #fff;
  outline: none; transition: border-color 0.2s, background 0.2s;
}
.search-box input[type="text"]::placeholder { color: rgba(255,255,255,0.4); }
.search-box input[type="text"]:focus { border-color: var(--accent); background: rgba(255,255,255,0.11); }

.btn-search {
  padding: 13px 28px; background: #fec106; color: #061A45;
  border: none; font-family: 'Inter', sans-serif;
  font-size: 13px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  cursor: pointer; white-space: nowrap; transition: background 0.2s;
}
.btn-search:hover { background: #e6ad00; }

.filters-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filter-select {
  width: auto;
  padding: 8px 32px 8px 12px;
  border: 1.5px solid rgba(255,255,255,0.18);
  font-family: 'Inter', sans-serif; font-size: 13px;
  background: rgba(255,255,255,0.06) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='rgba(255,255,255,0.5)' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 10px center;
  color: rgba(255,255,255,0.85);
  cursor: pointer; outline: none; appearance: none;
  transition: border-color 0.2s;
}
.filter-select option { background: var(--navy2); color: #fff; }
.filter-select:focus { border-color: var(--accent); }

.filter-clear {
  padding: 8px 16px;
  border: 1.5px solid rgba(255,255,255,0.18);
  font-family: 'Inter', sans-serif; font-size: 13px;
  background: none; color: rgba(255,255,255,0.5);
  cursor: pointer; transition: all 0.2s; margin-left: auto;
}
.filter-clear:hover { border-color: #fff; color: #fff; }

.section-header {
  display: flex; align-items: center;
  justify-content: space-between; margin-bottom: 20px;
}
.section-header.baseline { align-items: baseline; margin-bottom: 24px; }
.section-title {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--navy);
}
.section-count { font-size: 13px; color: var(--muted); }

.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 20px;
}

.listing-card {
  background: var(--surface); border: 1px solid var(--border);
  overflow: hidden; text-decoration: none; color: inherit;
  display: block; transition: transform 0.22s, box-shadow 0.22s;
  box-shadow: var(--shadow);
}
.listing-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }

.card-photo {
  width: 100%; aspect-ratio: 4/3;
  overflow: hidden; position: relative; background: #dde3ec;
}
.card-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.listing-card:hover .card-photo img { transform: scale(1.04); }

.listing-card.is-sold .card-photo::after {
  content: ''; position: absolute; inset: 0;
  background: rgba(255,255,255,0.55); pointer-events: none;
}
.listing-card.is-sold .card-price { text-decoration: line-through; color: var(--muted); }
.price-sold-label {
  font-size: 18px; font-weight: 800;
  color: #c0392b; margin-left: 8px;
  text-decoration: none; display: inline-block;
}

.card-body { padding: 16px 18px 18px; }
.card-price {
  font-size: 20px; font-weight: 800;
  color: var(--navy); margin-bottom: 4px;
}
.card-title { font-size: 14px; font-weight: 500; margin-bottom: 10px; color: var(--text); }
.card-meta { display: flex; flex-wrap: wrap; gap: 5px; }
.meta-tag {
  font-size: 11px; color: var(--muted);
  background: var(--bg); padding: 3px 9px;
  border: 1px solid var(--border);
  display: flex; align-items: center; gap: 4px;
}
.color-dot {
  display: inline-block; width: 8px; height: 8px;
  border-radius: 50%; border: 1px solid rgba(0,0,0,0.12); flex-shrink: 0;
}
.card-location {
  font-size: 12px; color: var(--muted);
  margin-top: 10px; display: flex; align-items: center; gap: 4px;
}

.no-results { text-align: center; padding: 60px 20px; color: var(--muted); }
.no-results svg { margin-bottom: 16px; opacity: 0.35; }
.no-results p { font-size: 15px; }

.post-cta {
  border: 1.5px dashed var(--border); padding: 32px;
  text-align: center; margin-top: 40px;
}
.post-cta h3 {
  font-size: 16px; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
  margin-bottom: 8px; color: var(--navy);
}
.post-cta p { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.btn-post {
  display: inline-block; padding: 12px 28px;
  background: #fec106; color: var(--navy);
  font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 700;
  letter-spacing: 0.06em; text-decoration: none; text-transform: uppercase;
  transition: background 0.2s;
}
.btn-post:hover { background: #e6ad00; }


/* ════════════════════════════════════════════
   LISTING PAGE
   ════════════════════════════════════════════ */

.page {
  width: 100%; max-width: var(--page-width); margin: 0 auto;
  padding: 36px 0 60px;
  display: grid; grid-template-columns: 1fr 340px;
  gap: 28px; align-items: start;
}
.page-left, .page-right { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

.carousel { overflow: hidden; background: #dde3ec; box-shadow: var(--shadow); }
.carousel-main { width: 100%; aspect-ratio: 4/3; position: relative; overflow: hidden; cursor: zoom-in; }
.carousel-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 0.35s; }
.carousel-slide.active { opacity: 1; }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; }
.carousel-placeholder {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 10px; color: #8898b0;
}
.carousel-placeholder span { font-size: 13px; }
.carousel-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 100%; padding: 0 12px;
  display: flex; justify-content: space-between; pointer-events: none;
}
.carousel-btn {
  pointer-events: all; width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.92); border: 1px solid rgba(0,0,0,0.08);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: transform 0.15s, background 0.15s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.14);
}
.carousel-btn:hover { background: #fff; transform: scale(1.08); }
.carousel-counter {
  position: absolute; bottom: 12px; right: 14px;
  background: rgba(13,34,64,0.6); color: #fff; font-size: 12px; padding: 3px 10px;
}
.carousel-thumbs {
  display: flex; gap: 6px; padding: 8px 10px;
  background: #eaeef4; overflow-x: auto; scrollbar-width: none;
}
.carousel-thumbs::-webkit-scrollbar { display: none; }
.thumb {
  flex-shrink: 0; width: 58px; height: 44px;
  overflow: hidden; border: 2px solid transparent;
  cursor: pointer; opacity: 0.6; transition: border-color 0.2s, opacity 0.2s;
}
.thumb.active { border-color: var(--accent); opacity: 1; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }

.description-card {
  background: var(--surface); border: 1px solid var(--border);
  padding: 24px 26px; box-shadow: var(--shadow);
}
.card-section-title {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 12px;
}
.description-text { font-size: 14px; color: #3a4a60; line-height: 1.8; white-space: pre-line; }

.details-card {
  background: var(--surface); border: 1px solid var(--border);
  padding: 24px 26px; box-shadow: var(--shadow);
}
.listing-price {
  font-size: 30px; font-weight: 800; color: var(--navy); margin-bottom: 4px;
}
.listing-title {
  font-size: 16px; font-weight: 700; margin-bottom: 20px; color: var(--text);
}
.spec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.spec-item { background: var(--bg); padding: 10px 12px; }
.spec-label {
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 3px;
}
.spec-value { font-size: 13px; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 5px; }
.gen-pill {
  display: inline-block; padding: 3px 10px;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
}
.gen-pill.gen1  { background: var(--gen1);  color: #fff; }
.gen-pill.gen2  { background: var(--gen2);  color: #fff; }
.gen-pill.gen3  { background: var(--gen3);  color: #fff; }
.gen-pill.gengt { background: var(--gengt); color: #fff; }
.sold-banner {
  display: flex; align-items: center; gap: 10px;
  background: #fdecea; border: 1px solid #e05252;
  padding: 10px 14px; margin-bottom: 14px;
  font-size: 13px; color: #8b1a1a; font-weight: 600;
}
.price-struck { text-decoration: line-through; color: var(--muted); }
.price-sold-tag { font-size: 16px; font-weight: 800; color: #c0392b; margin-left: 8px; }
.listing-color-dot {
  display: inline-block; width: 12px; height: 12px;
  border-radius: 50%; border: 1px solid rgba(0,0,0,0.14); flex-shrink: 0;
}
.vin-block { background: var(--bg); padding: 10px 14px; margin-bottom: 14px; }
.vin-label {
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 3px;
}
.vin-value { font-family: monospace; font-size: 13px; color: var(--text); letter-spacing: 0.06em; }
.location-row { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }

.contact-card {
  background: var(--surface); border: 1px solid var(--border);
  padding: 24px 26px; box-shadow: var(--shadow);
}
.seller-row { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.seller-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--navy);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.seller-name-text { font-size: 15px; font-weight: 600; }
.contact-form-group { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.contact-input {
  width: 100%; padding: 10px 12px;
  border: 1.5px solid var(--border);
  font-family: 'Inter', sans-serif; font-size: 13px;
  color: var(--text); background: var(--bg);
  outline: none; transition: border-color 0.2s;
}
.contact-input:focus { border-color: var(--accent); background: #fff; }
.contact-input::placeholder { color: var(--muted); }
textarea.contact-input { resize: vertical; min-height: 90px; }
.btn-contact {
  display: block; width: 100%; padding: 13px;
  background: var(--navy); color: #fff; border: none;
  font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  text-align: center; cursor: pointer; transition: background 0.2s;
}
.btn-contact:hover { background: var(--navy2); }
.btn-contact:disabled { background: var(--muted); cursor: not-allowed; }
.contact-success {
  padding: 12px; background: #e8f5ee; border: 1px solid #1dab72;
  color: #0d6b3e; font-size: 13px; text-align: center; margin-top: 12px;
}
.contact-error {
  padding: 12px; background: #fdecea; border: 1px solid #e05252;
  color: #8b1a1a; font-size: 13px; text-align: center; margin-top: 12px;
}
.safety-note { font-size: 11px; color: var(--muted); text-align: center; margin-top: 8px; }

.sell-cta {
  width: 100%; max-width: var(--page-width); margin: 0 auto 60px;
  padding: 32px 40px; border: 1.5px dashed var(--border); text-align: center;
}
.sell-cta h3 {
  font-size: 14px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--navy); margin-bottom: 8px;
}
.sell-cta p { color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.btn-sell {
  display: inline-block; padding: 12px 28px;
  background: var(--yellow); color: var(--yellow-text);
  font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  text-decoration: none; transition: background 0.2s;
}
.btn-sell:hover { background: var(--yellow-hover); }

.lightbox {
  display: none; position: fixed; inset: 0;
  background: rgba(6,26,69,0.96); z-index: 1000; flex-direction: column;
}
.lightbox.open { display: flex; }
.lightbox-img-wrap {
  position: relative; flex: 1; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 20px 80px; cursor: zoom-out;
}
.lightbox-img-wrap img {
  max-width: 100%; max-height: calc(100vh - 150px);
  object-fit: contain; user-select: none; pointer-events: none;
}
.lightbox-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px;
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.2);
  color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s; pointer-events: all;
}
.lightbox-btn:hover { background: rgba(255,255,255,0.24); }
.lightbox-btn.prev { left: 16px; }
.lightbox-btn.next { right: 16px; }
.lightbox-close {
  position: absolute; top: 16px; right: 20px;
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
  color: #fff; cursor: pointer; z-index: 10;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.lightbox-close:hover { background: rgba(255,255,255,0.24); }
.lightbox-counter {
  color: rgba(255,255,255,0.6); font-size: 13px;
  text-align: center; margin-bottom: 10px; flex-shrink: 0;
}
.lightbox-thumbs {
  display: flex; gap: 8px; justify-content: center;
  padding: 0 20px 24px; overflow-x: auto;
  scrollbar-width: none; flex-shrink: 0;
}
.lightbox-thumbs::-webkit-scrollbar { display: none; }
.lightbox-thumb {
  flex-shrink: 0; width: 64px; height: 48px;
  overflow: hidden; border: 2px solid transparent;
  cursor: pointer; opacity: 0.45; transition: border-color 0.2s, opacity 0.2s;
}
.lightbox-thumb.active { border-color: var(--yellow); opacity: 1; }
.lightbox-thumb img { width: 100%; height: 100%; object-fit: cover; }


/* ════════════════════════════════════════════
   MY LISTINGS PAGE
   ════════════════════════════════════════════ */

.btn-post-new {
  padding: 9px 20px;
  background: var(--yellow); color: var(--yellow-text);
  border: none; font-family: 'Inter', sans-serif;
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  transition: background 0.2s; display: inline-block;
}
.btn-post-new:hover { background: var(--yellow-hover); }

.listing-row {
  background: var(--surface); border: 1px solid var(--border);
  display: grid; grid-template-columns: 80px 1fr;
  grid-template-rows: auto auto;
  margin-bottom: 12px; overflow: hidden; box-shadow: var(--shadow);
}
.listing-thumb {
  width: 80px; overflow: hidden;
  background: #dde3ec; flex-shrink: 0; grid-row: 1 / 3;
}
.listing-thumb img { width: 100%; height: 100%; object-fit: cover; }
.listing-thumb-ph {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center; color: #8898b0;
}
.listing-info { padding: 12px 16px; min-width: 0; }
.listing-title-text {
  font-size: 14px; font-weight: 600; color: var(--text);
  margin-bottom: 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.listing-meta {
  font-size: 12px; color: var(--muted);
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
}
.status-pill {
  display: inline-block; padding: 2px 8px;
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.status-pill.pending  { background: #fff3cd; color: #856404; }
.status-pill.active   { background: #d1f5e5; color: #0d6b3e; }
.status-pill.sold     { background: #e8eef3; color: var(--muted); }
.status-pill.rejected { background: #fdecea; color: #8b1a1a; }

.listing-actions {
  padding: 8px 16px 14px;
  display: flex; flex-direction: row; gap: 8px;
  align-items: center; flex-wrap: wrap;
}
.action-btn {
  display: inline-flex; align-items: center;
  padding: 5px 12px; font-family: 'Inter', sans-serif;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  box-sizing: border-box; line-height: 1;
  transition: opacity 0.15s; text-decoration: none;
}
.action-btn:hover { opacity: 0.8; }
.action-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-sold   { background: var(--muted); color: #fff; }
.btn-view   { background: none; color: var(--navy); border: 1px solid var(--navy); }
.btn-delete { background: none; color: #c0392b; border: 1px solid #c0392b; }
.btn-edit   { background: none; color: var(--muted); border: 1px solid var(--border); }

.pending-note { font-size: 11px; color: #856404; margin-top: 3px; }


/* ════════════════════════════════════════════
   EDIT & POST FORMS
   ════════════════════════════════════════════ */

.form-section {
  background: var(--surface); border: 1px solid var(--border);
  padding: 28px 32px; margin-bottom: 20px; box-shadow: var(--shadow);
}
.form-section-title {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 20px;
  padding-bottom: 12px; border-bottom: 1px solid var(--border);
}

.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

input[type="text"], input[type="number"], input[type="tel"],
input[type="email"], select, textarea {
  width: 100%; padding: 10px 12px;
  border: 1.5px solid var(--border);
  font-family: 'Inter', sans-serif; font-size: 14px;
  color: var(--text); background: var(--bg);
  outline: none; transition: border-color 0.2s, background 0.2s; appearance: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); background: #fff; }
input[disabled]:focus { border-color: var(--border); background: var(--bg); }
input::placeholder, textarea::placeholder { color: var(--muted); }
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7a94' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  padding-right: 36px; cursor: pointer;
}
textarea { resize: vertical; min-height: 120px; }

.photo-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.photo-thumb {
  position: relative; width: 90px; height: 68px;
  border: 1px solid var(--border); overflow: hidden;
}
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.photo-preview {
  position: relative; width: 90px; height: 68px;
  border: 1px solid var(--border); overflow: hidden;
}
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-remove {
  position: absolute; top: 3px; right: 3px;
  width: 20px; height: 20px;
  background: rgba(6,26,69,0.75); color: #fff;
  border: none; cursor: pointer; font-size: 14px;
  display: flex; align-items: center; justify-content: center; line-height: 1;
}
.photo-previews { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

.photo-drop {
  border: 2px dashed var(--border); padding: 20px;
  text-align: center; cursor: pointer; position: relative;
  transition: border-color 0.2s, background 0.2s;
}
.photo-drop:hover, .photo-drop.dragover { border-color: var(--accent); background: rgba(2,69,122,0.03); }
.photo-drop input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.photo-drop-icon { color: var(--muted); margin-bottom: 10px; }
.photo-drop-label { font-size: 14px; font-weight: 500; color: var(--text); margin-bottom: 2px; }
.photo-drop-label strong { color: var(--accent); }
.photo-drop-hint { font-size: 12px; color: var(--muted); }

.submit-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.btn-submit {
  padding: 14px 36px; background: var(--yellow); color: var(--yellow-text);
  border: 1.5px solid transparent; font-family: 'Inter', sans-serif;
  font-size: 14px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  cursor: pointer; transition: background 0.2s; line-height: 1;
}
.btn-submit:hover { background: var(--yellow-hover); }
.btn-submit:disabled { background: var(--muted); cursor: not-allowed; }
.btn-cancel {
  padding: 14px 28px; background: none; color: #FF6685;
  border: 1.5px solid #FF6685; font-family: 'Inter', sans-serif;
  font-size: 14px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  cursor: pointer; text-decoration: none;
  transition: background 0.2s, color 0.2s;
  display: inline-flex; align-items: center; line-height: 1;
}
.btn-cancel:hover { background: #FF6685; color: #fff; }
.submit-note { font-size: 12px; color: var(--muted); }

.form-error {
  background: #fdecea; border: 1px solid #e05252;
  color: #8b1a1a; font-size: 13px; padding: 12px 16px; margin-top: 16px;
}

.success-screen {
  display: none; background: var(--surface); border: 1px solid var(--border);
  padding: 60px 40px; text-align: center; box-shadow: var(--shadow);
}
.success-screen.visible { display: block; }
.success-icon {
  width: 56px; height: 56px; background: #e8f5ee; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 20px;
}
.success-screen h2 { font-size: 20px; font-weight: 800; color: var(--navy); margin-bottom: 10px; }
.success-screen p { color: var(--muted); font-size: 14px; margin-bottom: 24px; }
.btn-back-market {
  display: inline-block; padding: 12px 28px;
  background: var(--navy); color: #fff;
  font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  text-decoration: none; transition: background 0.2s;
}
.btn-back-market:hover { background: var(--navy2); }


/* ════════════════════════════════════════════
   AUTH PAGE
   ════════════════════════════════════════════ */

.auth-page {
  flex: 1; display: flex; align-items: center;
  justify-content: center; padding: 40px 16px;
}
.auth-card {
  background: var(--surface); border: 1px solid var(--border);
  padding: 40px 36px; width: 100%; max-width: 420px;
  box-shadow: var(--shadow);
}
.auth-card-icon {
  width: 48px; height: 48px; background: var(--navy);
  display: flex; align-items: center; justify-content: center; margin-bottom: 20px;
}
.auth-card-title { font-size: 20px; font-weight: 800; color: var(--navy); margin-bottom: 6px; }
.auth-card-sub { font-size: 13px; color: var(--muted); margin-bottom: 28px; line-height: 1.6; }
.auth-card-sub strong { color: var(--text); font-weight: 600; }

.input-field {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--border);
  font-family: 'Inter', sans-serif; font-size: 15px;
  color: var(--text); background: var(--bg);
  outline: none; transition: border-color 0.2s, background 0.2s; margin-bottom: 16px;
}
.input-field:focus { border-color: var(--navy); background: #fff; }
.input-field::placeholder { color: var(--muted); }
.otp-input { font-size: 28px; font-weight: 700; letter-spacing: 0.3em; text-align: center; padding: 14px; margin-bottom: 8px; }
.otp-hint { font-size: 12px; color: var(--muted); text-align: center; margin-bottom: 20px; }

.btn-primary {
  display: block; width: 100%; padding: 13px;
  background: var(--yellow); color: var(--yellow-text);
  border: none; font-family: 'Inter', sans-serif;
  font-size: 13px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  cursor: pointer; transition: background 0.2s;
}
.btn-primary:hover { background: var(--yellow-hover); }
.btn-primary:disabled { background: var(--muted); cursor: not-allowed; }

.divider {
  display: flex; align-items: center; gap: 12px;
  margin: 20px 0; color: var(--muted); font-size: 12px;
}
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.btn-text {
  background: none; border: none; padding: 0;
  font-family: 'Inter', sans-serif; font-size: 13px;
  color: var(--navy); cursor: pointer; text-decoration: underline; transition: opacity 0.15s;
}
.btn-text:hover { opacity: 0.7; }
.btn-text:disabled { color: var(--muted); text-decoration: none; cursor: default; }

.resend-row { text-align: center; font-size: 13px; color: var(--muted); }

.alert { padding: 11px 14px; font-size: 13px; margin-bottom: 16px; }
.alert-error { background: #fdecea; border: 1px solid var(--red); color: #8b1a1a; }
.alert-success { background: #e8f5ee; border: 1px solid var(--green); color: #0d6b3e; }

.success-card { text-align: center; }
.success-card .success-icon {
  width: 56px; height: 56px; border-radius: 50%; background: #e8f5ee;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 18px;
}
.success-card h2 { font-size: 18px; font-weight: 800; color: var(--navy); margin-bottom: 8px; }
.success-card p  { font-size: 13px; color: var(--muted); }

.step { display: none; }
.step.active { display: block; }


/* ════════════════════════════════════════════
   BURGER MENU
   ════════════════════════════════════════════ */

.auth-desktop { display: flex; align-items: center; gap: 16px; }
.signin-link { display: flex; align-items: center; gap: 6px; }

.burger-btn {
  display: none;
  background: none; border: none; cursor: pointer;
  color: var(--text); padding: 8px;
  align-items: center; justify-content: center;
}
.burger-icon  { display: block; }
.burger-close { display: none; }
.burger-btn.open .burger-icon  { display: none; }
.burger-btn.open .burger-close { display: block; }

.topbar-auth { position: relative; }

.burger-menu {
  display: none;
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-hover); min-width: 220px; z-index: 200;
  flex-direction: column;
}
.burger-menu.open { display: flex; }
.burger-email {
  font-size: 12px; color: var(--muted);
  padding: 14px 20px 12px;
  border-bottom: 1px solid var(--border);
}
.burger-menu a,
.burger-menu > button {
  display: block; width: 100%; text-align: left;
  padding: 13px 20px; font-size: 14px; font-weight: 500;
  color: var(--text); text-decoration: none;
  background: none; border: none; border-bottom: 1px solid var(--border);
  cursor: pointer; font-family: 'Inter', sans-serif;
  transition: background 0.15s;
}
.burger-menu a:last-child,
.burger-menu > button:last-child { border-bottom: none; }
.burger-menu a:hover,
.burger-menu > button:hover { background: var(--bg); }

@media (max-width: 640px) {
  .auth-desktop { display: none; }
  .burger-btn   { display: flex; }
}


/* ════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════ */

.site-footer {
  background: #001B48;
  padding: 36px 24px;
  margin-top: auto;
}
.footer-inner {
  max-width: 940px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: center;
  align-items: center;
}
.footer-links a {
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.15s;
}
.footer-links a:hover { color: #fff; }
.footer-sep { color: rgba(255,255,255,0.2); font-size: 13px; }
.footer-copy { color: rgba(255,255,255,0.3); font-size: 12px; }


/* ════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════ */

@media (max-width: 720px) {
  /* Listing page */
  .topbar { padding-left: 16px; padding-right: 16px; }
  .breadcrumb-bar { padding-left: 16px; padding-right: 16px; }
  .page {
    padding: 16px 16px 40px !important;
    display: flex !important; flex-direction: column !important; gap: 16px !important;
  }
  .page-left, .page-right { display: contents !important; }
  .col-gallery, .col-desc, .col-specs, .col-contact { width: 100% !important; margin-top: 0 !important; }
  .col-specs   { order: 1; }
  .col-gallery { order: 2; }
  .col-desc    { order: 3; }
  .col-contact { order: 4; }
  .sell-cta { margin: 0 16px 40px; padding: 24px 16px; }
  .lightbox-img-wrap { padding: 20px 50px; }
  .lightbox-btn { width: 38px; height: 38px; }
  .lightbox-btn.prev { left: 6px; }
  .lightbox-btn.next { right: 6px; }
}

@media (max-width: 640px) {
  .topbar { padding: 0 16px; }
  .breadcrumb-bar { padding: 0 16px; }
  .search-section { padding-left: 16px; padding-right: 16px; }
  .main { padding-left: 16px; padding-right: 16px; }
  .page-header { padding-left: 16px; padding-right: 16px; }
  .search-row { flex-wrap: wrap; }
  .listings-grid { grid-template-columns: 1fr; }
  /* My Listings */
  .listing-row { grid-template-columns: 70px 1fr; }
  .listing-thumb { grid-row: 1 / 3; }
  .listing-actions { flex-direction: row; flex-wrap: wrap; }
  /* Forms */
  .form-section { padding: 20px 16px; }
  .field-row, .field-row-3 { grid-template-columns: 1fr; gap: 16px; }
}
