/* ============ RESET & BASE ============ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --amber: #F59E0B;
  --amber-dark: #D97706;
  --amber-light: #FEF3C7;
  --amber-50: #FFFBEB;
  --dark: #0F172A;
  --dark-700: #1E293B;
  --dark-600: #334155;
  --gray-400: #94A3B8;
  --gray-300: #CBD5E1;
  --gray-200: #E2E8F0;
  --gray-100: #F1F5F9;
  --gray-50: #F8FAFC;
  --green: #10B981;
  --green-light: #D1FAE5;
  --red: #EF4444;
  --white: #FFFFFF;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.15);
  --transition: 0.2s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--gray-50);
  color: var(--dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.02em; }
a { color: var(--amber-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 720px; margin: 0 auto; padding: 0 24px; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: 10px; border: none;
  font-family: inherit; font-size: 0.95rem; font-weight: 600;
  cursor: pointer; transition: all var(--transition);
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--amber); color: var(--dark); }
.btn-primary:hover { background: var(--amber-dark); color: white; }
.btn-outline { background: transparent; border: 2px solid var(--dark); color: var(--dark); }
.btn-outline:hover { background: var(--dark); color: white; }
.btn-white { background: white; color: var(--dark); }
.btn-white:hover { background: var(--gray-100); }
.btn-danger { background: var(--red); color: white; }
.btn-danger:hover { opacity: 0.9; }

.btn-lg { padding: 14px 28px; font-size: 1.05rem; border-radius: 12px; }
.btn-sm { padding: 6px 14px; font-size: 0.85rem; border-radius: 8px; }
.btn-block { width: 100%; justify-content: center; }

/* ============ NAV ============ */
#main-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,0.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
  height: 64px;
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 100%;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--dark);
}
.logo-icon { display: flex; }
.logo-text { font-size: 1.2rem; font-weight: 800; letter-spacing: -0.03em; }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-links a, .nav-links button {
  font-size: 0.9rem; font-weight: 500; color: var(--dark-600);
  padding: 8px 14px; border-radius: 8px; text-decoration: none;
  background: none; border: none; cursor: pointer; font-family: inherit;
  transition: all var(--transition);
}
.nav-links a:hover, .nav-links button:hover { background: var(--gray-100); color: var(--dark); }
.nav-links .btn-primary { color: var(--dark); }

/* ============ HERO ============ */
.hero {
  min-height: 100vh; display: flex; align-items: center;
  position: relative; padding: 120px 24px 80px; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
}
.hero-gradient {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 30%, #FDE68A 60%, #FCD34D 100%);
}
.hero-pattern {
  position: absolute; inset: 0; opacity: 0.07;
  background-image: radial-gradient(circle at 25% 25%, var(--amber) 1px, transparent 1px),
                    radial-gradient(circle at 75% 75%, var(--amber) 1px, transparent 1px);
  background-size: 40px 40px;
}
.hero-inner {
  max-width: 800px; margin: 0 auto; position: relative; z-index: 1;
  text-align: center;
}
.hero-badge {
  display: inline-block; padding: 8px 20px;
  background: rgba(245,158,11,0.15); border: 1px solid rgba(245,158,11,0.3);
  border-radius: 100px; font-size: 0.85rem; font-weight: 600;
  color: var(--amber-dark); letter-spacing: 0.03em;
  margin-bottom: 28px;
}
.hero h1 {
  font-size: clamp(3rem, 8vw, 5rem); font-weight: 900;
  letter-spacing: -0.04em; color: var(--dark);
  margin-bottom: 24px;
}
.hero-accent { color: var(--amber-dark); }
.hero-sub {
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
  color: var(--dark-600); max-width: 580px; margin: 0 auto 40px;
  line-height: 1.7;
}
.hero-actions {
  display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;
  margin-bottom: 56px;
}
.hero-stats {
  display: flex; gap: 48px; justify-content: center; flex-wrap: wrap;
}
.hero-stat { text-align: center; }
.stat-num {
  display: block; font-size: 2rem; font-weight: 800;
  color: var(--dark); letter-spacing: -0.03em;
}
.stat-label {
  font-size: 0.85rem; color: var(--dark-600); font-weight: 500;
}

/* ============ SECTIONS ============ */
.section-header { text-align: center; margin-bottom: 56px; }
.section-tag {
  display: inline-block; font-size: 0.85rem; font-weight: 600;
  color: var(--amber-dark); text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 16px;
}
.section-header h2 {
  font-size: clamp(2rem, 5vw, 3rem); font-weight: 800;
  color: var(--dark);
}

/* How It Works */
.how-section { padding: 100px 24px; background: white; }
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.how-card {
  text-align: center; padding: 40px 28px;
  background: var(--gray-50); border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  transition: all 0.3s ease; position: relative;
}
.how-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--amber); }
.how-num {
  position: absolute; top: 16px; left: 20px;
  font-size: 0.85rem; font-weight: 700; color: var(--amber);
  background: var(--amber-light); width: 28px; height: 28px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.how-icon { margin-bottom: 20px; }
.how-card h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 12px; }
.how-card p { font-size: 0.95rem; color: var(--dark-600); line-height: 1.65; }

/* Seller / Buyer Sections */
.seller-section { padding: 100px 24px; background: var(--gray-50); }
.buyer-section { padding: 100px 24px; background: white; }

.split-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split-layout.reverse .split-content { order: 2; }
.split-layout.reverse .split-visual { order: 1; }

.split-content h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 800;
  margin-bottom: 20px;
}
.split-content > p {
  font-size: 1.05rem; color: var(--dark-600); line-height: 1.7;
  margin-bottom: 28px;
}

.check-list { list-style: none; margin-bottom: 32px; }
.check-list li {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 8px 0; font-size: 0.95rem; color: var(--dark-700);
}
.check-list li svg { flex-shrink: 0; margin-top: 2px; }

/* Phone Mockup */
.phone-mockup {
  background: var(--dark); border-radius: 32px; padding: 12px;
  max-width: 320px; margin: 0 auto;
  box-shadow: var(--shadow-xl);
}
.phone-screen {
  background: white; border-radius: 24px; padding: 24px;
  min-height: 380px;
}
.mock-header {
  font-size: 1.1rem; font-weight: 700; text-align: center;
  padding-bottom: 16px; border-bottom: 1px solid var(--gray-200);
  margin-bottom: 16px;
}
.mock-field {
  padding: 12px; background: var(--gray-50); border-radius: 10px;
  margin-bottom: 10px; font-size: 0.85rem;
}
.mock-field span {
  display: block; font-size: 0.75rem; font-weight: 600;
  color: var(--gray-400); margin-bottom: 4px;
}
.mock-video-upload {
  border: 2px dashed var(--amber); border-radius: 12px;
  padding: 20px; text-align: center; margin: 12px 0;
}
.mock-video-upload span { display: block; font-size: 0.8rem; font-weight: 600; color: var(--amber-dark); margin-top: 8px; }
.mock-btn {
  background: var(--amber); color: var(--dark); text-align: center;
  padding: 12px; border-radius: 10px; font-weight: 700; font-size: 0.9rem;
  margin-top: 12px;
}

/* Map Preview */
.map-preview {
  background: var(--gray-100); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-lg);
}
.map-fake {
  position: relative; height: 400px;
  background: linear-gradient(135deg, #E0F0E3, #D4E8D1, #C8E0C5);
  overflow: hidden;
}
.map-pin {
  position: absolute; width: 12px; height: 12px;
  background: var(--amber); border-radius: 50%;
  border: 3px solid white; box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  cursor: pointer; transition: all 0.3s ease; z-index: 2;
}
.map-pin span {
  position: absolute; bottom: calc(100% + 6px); left: 50%;
  transform: translateX(-50%); white-space: nowrap;
  background: var(--dark); color: white; font-size: 0.75rem;
  padding: 4px 10px; border-radius: 6px; font-weight: 600;
  opacity: 0; transition: opacity 0.2s;
}
.map-pin:hover span, .map-pin.active span { opacity: 1; }
.map-pin.active { width: 16px; height: 16px; background: var(--amber-dark); }
.map-overlay {
  position: absolute; inset: 0; display: flex;
  align-items: center; justify-content: center;
  background: rgba(15,23,42,0.3); z-index: 3;
}
.map-overlay-text {
  color: white; font-size: 1.1rem; font-weight: 700;
  text-align: center; line-height: 1.5;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

/* CTA */
.cta-section { padding: 80px 24px; background: var(--gray-50); }
.cta-card {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-700) 100%);
  border-radius: var(--radius-lg); padding: 72px 48px;
  text-align: center; color: white;
}
.cta-card h2 {
  font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; margin-bottom: 16px;
}
.cta-card p {
  font-size: 1.1rem; color: rgba(255,255,255,0.7);
  max-width: 500px; margin: 0 auto 32px;
}
.cta-actions { display: flex; gap: 16px; justify-content: center; }

/* Footer */
.site-footer { padding: 60px 24px 32px; background: white; border-top: 1px solid var(--gray-200); }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 32px; }
.footer-brand .logo-text { font-size: 1.1rem; margin-bottom: 8px; display: block; }
.footer-brand p { font-size: 0.9rem; color: var(--gray-400); }
.footer-links { display: flex; gap: 24px; }
.footer-links a { font-size: 0.9rem; color: var(--dark-600); }
.footer-bottom { border-top: 1px solid var(--gray-200); padding-top: 20px; text-align: center; }
.footer-bottom p { font-size: 0.85rem; color: var(--gray-400); }
.footer-bottom a { color: var(--amber-dark); }

/* ============ AUTH PAGE ============ */
.auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 100px 24px 60px;
  background: linear-gradient(135deg, var(--gray-50) 0%, var(--amber-50) 100%);
}
.auth-card {
  background: white; border-radius: var(--radius-lg); padding: 40px;
  width: 100%; max-width: 440px;
  box-shadow: var(--shadow-lg); border: 1px solid var(--gray-200);
}
.auth-tabs { display: flex; gap: 4px; margin-bottom: 28px; background: var(--gray-100); border-radius: 10px; padding: 4px; }
.auth-tab {
  flex: 1; padding: 10px; text-align: center;
  font-weight: 600; font-size: 0.95rem; border: none;
  background: none; border-radius: 8px; cursor: pointer;
  color: var(--gray-400); transition: all var(--transition);
  font-family: inherit;
}
.auth-tab.active { background: white; color: var(--dark); box-shadow: var(--shadow-sm); }

.role-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.role-option input { display: none; }
.role-card {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 16px 8px; border: 2px solid var(--gray-200);
  border-radius: 12px; cursor: pointer; text-align: center;
  transition: all var(--transition);
}
.role-card strong { font-size: 0.85rem; }
.role-card small { font-size: 0.75rem; color: var(--gray-400); }
.role-option input:checked + .role-card {
  border-color: var(--amber); background: var(--amber-50);
}

/* ============ FORMS ============ */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block; font-size: 0.85rem; font-weight: 600;
  color: var(--dark-700); margin-bottom: 6px;
}
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 12px 16px; border: 2px solid var(--gray-200);
  border-radius: 10px; font-family: inherit; font-size: 0.95rem;
  color: var(--dark); background: white;
  transition: border-color var(--transition);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none; border-color: var(--amber);
}
.form-group textarea { resize: vertical; }
.form-error {
  background: #FEF2F2; border: 1px solid #FECACA; color: var(--red);
  padding: 12px 16px; border-radius: 10px; font-size: 0.9rem;
  margin-bottom: 16px;
}
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; }
.form-section { margin-bottom: 36px; padding-bottom: 36px; border-bottom: 1px solid var(--gray-200); }
.form-section h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 20px; }
.form-help { font-size: 0.9rem; color: var(--gray-400); margin-bottom: 16px; }

.category-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-chip {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px; border: 2px solid var(--gray-200);
  border-radius: 100px; font-size: 0.85rem; cursor: pointer;
  transition: all var(--transition); user-select: none;
}
.cat-chip input { display: none; }
.cat-chip:has(input:checked) {
  border-color: var(--amber); background: var(--amber-50); color: var(--amber-dark); font-weight: 600;
}

/* Video Upload */
.upload-dropzone {
  border: 2px dashed var(--gray-300); border-radius: var(--radius);
  padding: 48px 24px; text-align: center; cursor: pointer;
  transition: all var(--transition);
}
.upload-dropzone:hover { border-color: var(--amber); background: var(--amber-50); }
.upload-dropzone p { margin-top: 12px; color: var(--dark-600); }
.upload-hint { font-size: 0.8rem; color: var(--gray-400); }

.progress-bar {
  height: 6px; background: var(--gray-200); border-radius: 3px;
  overflow: hidden; margin: 16px 0 8px;
}
.progress-fill {
  height: 100%; background: var(--amber); border-radius: 3px;
  width: 0; transition: width 0.3s ease;
}

/* ============ BROWSE PAGE ============ */
.browse-page { padding-top: 64px; }
.browse-header {
  padding: 32px 24px; background: white;
  border-bottom: 1px solid var(--gray-200);
}
.browse-header h1 {
  font-size: 1.5rem; font-weight: 800; margin-bottom: 16px;
}
.search-bar { display: flex; gap: 12px; flex-wrap: wrap; }
.search-input-wrap {
  display: flex; align-items: center; gap: 10px;
  flex: 1; min-width: 200px; padding: 10px 16px;
  background: var(--gray-50); border: 2px solid var(--gray-200);
  border-radius: 10px;
}
.search-input-wrap svg { color: var(--gray-400); flex-shrink: 0; }
.search-input-wrap input {
  border: none; background: none; flex: 1; font-size: 0.95rem;
  font-family: inherit; color: var(--dark); outline: none;
}
.search-filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.filter-input {
  padding: 10px 14px; border: 2px solid var(--gray-200);
  border-radius: 10px; font-family: inherit; font-size: 0.9rem;
  background: white; color: var(--dark);
}
.filter-input:focus { outline: none; border-color: var(--amber); }

.browse-layout {
  display: grid; grid-template-columns: 1fr 1fr;
  height: calc(100vh - 180px);
}
.browse-map { min-height: 400px; }
.browse-results { overflow-y: auto; padding: 16px; background: var(--gray-50); }
.results-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 4px; margin-bottom: 12px;
}
.results-header span { font-size: 0.9rem; color: var(--gray-400); font-weight: 500; }

.results-list { display: flex; flex-direction: column; gap: 12px; }
.results-empty {
  text-align: center; padding: 60px 24px; color: var(--gray-400);
}
.results-empty p { margin-top: 12px; font-size: 0.95rem; }

/* Sale Card */
.sale-card {
  background: white; border-radius: var(--radius); padding: 16px;
  border: 1px solid var(--gray-200); cursor: pointer;
  transition: all var(--transition);
  display: flex; gap: 14px;
}
.sale-card:hover { border-color: var(--amber); box-shadow: var(--shadow); transform: translateY(-1px); }
.sale-card-thumb {
  width: 100px; height: 80px; border-radius: 8px;
  background: var(--gray-100); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; position: relative;
}
.sale-card-thumb video, .sale-card-thumb img {
  width: 100%; height: 100%; object-fit: cover;
}
.sale-card-thumb .play-badge {
  position: absolute; inset: 0; display: flex;
  align-items: center; justify-content: center;
  background: rgba(0,0,0,0.3);
}
.sale-card-info { flex: 1; min-width: 0; }
.sale-card-info h3 {
  font-size: 0.95rem; font-weight: 700; margin-bottom: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sale-card-meta {
  font-size: 0.8rem; color: var(--gray-400);
  display: flex; flex-direction: column; gap: 2px;
}
.sale-card-cats { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.sale-card-cats span {
  font-size: 0.7rem; padding: 2px 8px; background: var(--amber-light);
  color: var(--amber-dark); border-radius: 100px; font-weight: 600;
}
.video-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.75rem; font-weight: 600; color: var(--amber-dark);
  background: var(--amber-light); padding: 2px 8px; border-radius: 100px;
}

/* ============ SALE DETAIL PAGE ============ */
.sale-page { padding: 80px 24px 60px; max-width: 900px; margin: 0 auto; }
.sale-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.9rem; color: var(--gray-400); margin-bottom: 24px;
  cursor: pointer; font-weight: 500;
}
.sale-back:hover { color: var(--dark); }
.sale-video-wrap {
  border-radius: var(--radius-lg); overflow: hidden;
  background: var(--dark); margin-bottom: 28px;
  max-height: 500px; display: flex; align-items: center; justify-content: center;
}
.sale-video-wrap video {
  width: 100%; max-height: 500px; display: block;
}
.sale-video-wrap iframe {
  width: 100%; aspect-ratio: 16/9; border: none;
}
.no-video {
  padding: 80px 24px; text-align: center; color: var(--gray-400);
}
.no-video svg { margin-bottom: 12px; }

.sale-title { font-size: 2rem; font-weight: 800; margin-bottom: 12px; }
.sale-meta-row {
  display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 24px;
}
.sale-meta-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.9rem; color: var(--dark-600);
}
.sale-meta-item svg { color: var(--amber); flex-shrink: 0; }
.sale-desc {
  font-size: 1rem; line-height: 1.7; color: var(--dark-600);
  margin-bottom: 24px; white-space: pre-wrap;
}
.sale-cats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.sale-cats span {
  padding: 6px 14px; background: var(--amber-light);
  color: var(--amber-dark); border-radius: 100px; font-size: 0.85rem; font-weight: 600;
}
.sale-map-detail {
  height: 300px; border-radius: var(--radius); overflow: hidden;
  margin-top: 24px; border: 1px solid var(--gray-200);
}

/* ============ SELL PAGE ============ */
.sell-page {
  padding: 100px 24px 60px; background: var(--gray-50); min-height: 100vh;
}
.sell-page h1 { font-size: 2rem; font-weight: 800; margin-bottom: 8px; }
.sell-subtitle { color: var(--gray-400); margin-bottom: 36px; font-size: 1.05rem; }

/* ============ MY SALES PAGE ============ */
.my-sales-page { padding: 100px 24px 60px; min-height: 100vh; }
.page-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 28px;
}
.page-header h1 { font-size: 1.8rem; font-weight: 800; }

.my-sales-list { display: flex; flex-direction: column; gap: 16px; }
.my-sale-card {
  background: white; border-radius: var(--radius); padding: 20px;
  border: 1px solid var(--gray-200); display: flex; gap: 16px;
  align-items: center;
}
.my-sale-info { flex: 1; }
.my-sale-info h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 4px; }
.my-sale-info p { font-size: 0.85rem; color: var(--gray-400); }
.my-sale-actions { display: flex; gap: 8px; }
.status-badge {
  display: inline-block; padding: 4px 12px; border-radius: 100px;
  font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
}
.status-active { background: var(--green-light); color: var(--green); }
.status-ended { background: var(--gray-200); color: var(--gray-400); }

/* ============ LOADING ============ */
.loading-spinner {
  width: 32px; height: 32px; border: 3px solid var(--gray-200);
  border-top-color: var(--amber); border-radius: 50%;
  animation: spin 0.6s linear infinite; margin: 40px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ MOBILE ============ */
@media (max-width: 768px) {
  .how-grid { grid-template-columns: 1fr; }
  .split-layout { grid-template-columns: 1fr; gap: 40px; }
  .split-layout.reverse .split-content { order: 1; }
  .split-layout.reverse .split-visual { order: 2; }
  .browse-layout { grid-template-columns: 1fr; height: auto; }
  .browse-map { height: 300px; }
  .browse-results { max-height: 50vh; }
  .hero { padding: 100px 20px 60px; }
  .hero h1 { font-size: 2.8rem; }
  .hero-stats { gap: 28px; }
  .cta-card { padding: 48px 24px; }
  .auth-card { padding: 28px; }
  .role-picker { grid-template-columns: 1fr; }
  .sale-title { font-size: 1.5rem; }
  .sale-meta-row { flex-direction: column; gap: 10px; }
  .search-bar { flex-direction: column; }
  .search-filters { width: 100%; }
  .nav-links { gap: 4px; }
  .nav-links a, .nav-links button { padding: 6px 10px; font-size: 0.8rem; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .footer-inner { flex-direction: column; gap: 20px; }
}

/* ============ MESSAGING ============ */

/* Nav badge */
.msg-badge {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--red); color: white;
  font-size: 0.65rem; font-weight: 700;
  width: 18px; height: 18px; border-radius: 50%;
  position: absolute; top: -2px; right: -6px;
  line-height: 1;
}

/* "Message Seller" CTA on sale detail */
.msg-seller-cta {
  display: flex; align-items: center; gap: 16px;
  background: var(--amber-50); border: 2px solid var(--amber-light);
  border-radius: var(--radius); padding: 16px 20px;
  margin-bottom: 24px;
}
.msg-seller-hint {
  font-size: 0.875rem; color: var(--gray-400);
}

/* Message modal overlay */
.msg-modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(15,23,42,0.6); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.msg-modal-card {
  background: white; border-radius: var(--radius-lg);
  padding: 0; width: 100%; max-width: 480px;
  box-shadow: var(--shadow-xl);
  animation: slideUp 0.2s ease;
}
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.msg-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 0;
}
.msg-modal-header h3 { font-size: 1.1rem; }
.msg-modal-close {
  background: none; border: none; font-size: 1.5rem; cursor: pointer;
  color: var(--gray-400); line-height: 1; padding: 4px 8px; border-radius: 6px;
  transition: all var(--transition);
}
.msg-modal-close:hover { background: var(--gray-100); color: var(--dark); }
.msg-modal-body { padding: 16px 24px; }
.msg-modal-footer {
  display: flex; justify-content: flex-end; gap: 12px;
  padding: 16px 24px 20px; border-top: 1px solid var(--gray-100);
}

/* Upgrade banner */
.upgrade-banner {
  display: flex; align-items: flex-start; gap: 12px;
  background: linear-gradient(135deg, #FEF3C7, #FDE68A);
  border: 1px solid var(--amber-light); border-radius: var(--radius);
  padding: 14px 16px; margin-top: 12px;
}
.upgrade-banner svg { flex-shrink: 0; color: var(--amber-dark); margin-top: 2px; }
.upgrade-banner div { flex: 1; }
.upgrade-banner strong { font-size: 0.9rem; color: var(--dark); display: block; margin-bottom: 2px; }
.upgrade-banner p { font-size: 0.8rem; color: var(--dark-600); margin: 0; }
.upgrade-banner .btn { flex-shrink: 0; white-space: nowrap; }

/* Messages inbox page */
.messages-page { padding: 88px 0 40px; min-height: 100vh; }
.conversations-list { margin-top: 8px; }
.conv-card {
  display: flex; align-items: center; gap: 14px;
  background: white; border: 1px solid var(--gray-200);
  border-radius: var(--radius); padding: 16px;
  margin-bottom: 10px; cursor: pointer;
  transition: all var(--transition); position: relative;
}
.conv-card:hover { border-color: var(--amber); box-shadow: var(--shadow); transform: translateY(-1px); }
.conv-card-unread { border-left: 3px solid var(--amber); }
.conv-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--amber-light); color: var(--amber-dark);
  font-size: 1.1rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.conv-avatar-lg { width: 48px; height: 48px; font-size: 1.3rem; }
.conv-info { flex: 1; min-width: 0; }
.conv-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 2px; }
.conv-name { font-weight: 600; font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-time { font-size: 0.78rem; color: var(--gray-400); flex-shrink: 0; }
.conv-listing { font-size: 0.8rem; color: var(--amber-dark); margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-preview { font-size: 0.875rem; color: var(--gray-400); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-unread-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--amber); flex-shrink: 0;
}

/* Conversation thread page */
.conversation-page { padding: 88px 0 40px; min-height: 100vh; }
.thread-back {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.875rem; color: var(--gray-400); cursor: pointer;
  margin-bottom: 20px; width: fit-content;
  transition: color var(--transition);
}
.thread-back:hover { color: var(--dark); }
.thread-header {
  display: flex; align-items: center; gap: 14px;
  padding-bottom: 16px; border-bottom: 1px solid var(--gray-200);
  margin-bottom: 16px;
}
.thread-name { font-weight: 700; font-size: 1.05rem; }
.thread-listing { font-size: 0.85rem; display: flex; align-items: center; gap: 4px; margin-top: 3px; }
.thread-messages {
  display: flex; flex-direction: column; gap: 12px;
  min-height: 200px; max-height: 50vh; overflow-y: auto;
  padding: 16px 0;
  scrollbar-width: thin;
}
.thread-msg { display: flex; flex-direction: column; max-width: 80%; }
.thread-msg-me { align-self: flex-end; align-items: flex-end; }
.thread-msg-them { align-self: flex-start; align-items: flex-start; }
.thread-bubble {
  padding: 10px 14px; border-radius: 14px;
  font-size: 0.95rem; line-height: 1.5; white-space: pre-wrap; word-break: break-word;
}
.thread-msg-me .thread-bubble {
  background: var(--amber); color: var(--dark);
  border-bottom-right-radius: 4px;
}
.thread-msg-them .thread-bubble {
  background: white; border: 1px solid var(--gray-200);
  border-bottom-left-radius: 4px;
}
.thread-ts { font-size: 0.72rem; color: var(--gray-400); margin-top: 3px; }
.thread-compose {
  display: flex; gap: 10px; align-items: flex-end;
  margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--gray-100);
}
.thread-compose .btn { padding: 12px 16px; flex-shrink: 0; border-radius: 10px; }

/* ============ VIDEO LOCK ============ */
.video-locked { position: relative; }
.video-lock-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 40px 24px; text-align: center; border-radius: var(--radius-lg);
}
.video-lock-icon {
  width: 72px; height: 72px; background: rgba(245,158,11,0.15);
  border: 2px solid rgba(245,158,11,0.3); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.video-lock-title { font-size: 1.2rem; font-weight: 700; color: white; }
.video-lock-sub { font-size: 0.9rem; color: var(--gray-400); max-width: 320px; }

/* ============ BUYER ACTIONS ============ */
.buyer-actions {
  display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px;
}
.btn-fav-active { background: var(--amber-dark); color: white; }
.btn-fav-active:hover { background: var(--amber); color: var(--dark); }
.btn-route-active { background: var(--green); color: white; border: 2px solid var(--green); }
.btn-route-active:hover { background: #0EA271; }
.upgrade-hint-link { color: var(--amber-dark); font-weight: 600; }

/* ============ SALE CARD ROUTE BUTTON ============ */
.sale-card { position: relative; }
.sale-card-route-btn {
  position: absolute; top: 10px; right: 10px;
  width: 30px; height: 30px; border-radius: 8px;
  border: 2px solid var(--gray-200); background: white;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all var(--transition);
  color: var(--gray-400); padding: 0;
}
.sale-card-route-btn:hover { border-color: var(--amber); color: var(--amber); background: var(--amber-50); }
.sale-card-route-btn.route-btn-active { background: var(--green); border-color: var(--green); color: white; }

/* ============ NAV UPGRADE LINK ============ */
.nav-upgrade-link {
  color: var(--amber-dark) !important; font-weight: 600;
  display: inline-flex; align-items: center; gap: 4px;
}
.nav-upgrade-link:hover { text-decoration: none; color: var(--amber) !important; }

/* ============ MEMBERSHIP PAGE ============ */
.membership-page { padding: 80px 0 60px; }
.membership-hero { text-align: center; margin-bottom: 48px; }
.membership-badge {
  display: inline-block; background: var(--amber-light);
  color: var(--amber-dark); font-weight: 700; font-size: 0.85rem;
  padding: 6px 16px; border-radius: 100px; margin-bottom: 16px;
  letter-spacing: 0.05em; text-transform: uppercase;
}
.membership-badge-active { background: var(--green-light); color: var(--green); }
.membership-hero h1 { font-size: 2.5rem; margin-bottom: 16px; }
.membership-hero p { font-size: 1.1rem; color: var(--gray-400); max-width: 520px; margin: 0 auto; }

.membership-perks { display: flex; flex-direction: column; gap: 16px; margin-bottom: 48px; }
.perk-card {
  display: flex; gap: 16px; align-items: flex-start;
  background: white; border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg); padding: 20px 24px;
  box-shadow: var(--shadow-sm);
}
.perk-icon {
  width: 52px; height: 52px; flex-shrink: 0;
  background: var(--amber-50); border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}
.perk-content h3 { font-size: 1rem; margin-bottom: 4px; }
.perk-content p { font-size: 0.9rem; color: var(--gray-400); line-height: 1.5; }

.membership-cta {
  background: white; border: 2px solid var(--amber);
  border-radius: var(--radius-lg); padding: 32px;
  text-align: center; box-shadow: var(--shadow);
}
.membership-price { display: flex; align-items: baseline; justify-content: center; gap: 4px; margin-bottom: 8px; }
.price-amount { font-size: 3rem; font-weight: 800; color: var(--dark); }
.price-period { font-size: 1.1rem; color: var(--gray-400); }

/* ============ FAVORITES PAGE ============ */
.favorites-page { padding: 80px 0 60px; }
.favorites-list { display: flex; flex-direction: column; gap: 12px; }

/* ============ ALERTS PAGE ============ */
.alerts-page { padding: 80px 0 60px; }
.alert-form-card {
  background: white; border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg); padding: 24px;
  box-shadow: var(--shadow-sm); margin-bottom: 24px;
}
.alert-form-card h3 { font-size: 1rem; margin-bottom: 16px; }
.alert-card {
  display: flex; align-items: center; justify-content: space-between;
  background: white; border: 1px solid var(--gray-200);
  border-radius: var(--radius); padding: 14px 16px;
  box-shadow: var(--shadow-sm); margin-bottom: 10px;
}
.alert-card-info { display: flex; flex-direction: column; gap: 4px; }
.alert-card-name { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.95rem; }
.alert-card-detail { font-size: 0.8rem; color: var(--gray-400); }

/* ============ NOTIFICATIONS PAGE ============ */
.notifications-page { padding: 80px 0 60px; }
.notif-card {
  display: flex; align-items: center; gap: 14px;
  background: white; border: 1px solid var(--gray-200);
  border-radius: var(--radius); padding: 14px 16px;
  box-shadow: var(--shadow-sm); margin-bottom: 10px;
  cursor: pointer; transition: box-shadow var(--transition);
}
.notif-card:hover { box-shadow: var(--shadow); }
.notif-card-unread { border-left: 3px solid var(--amber); background: var(--amber-50); }
.notif-icon {
  width: 36px; height: 36px; flex-shrink: 0;
  background: var(--amber-50); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.notif-content { flex: 1; }
.notif-message { font-size: 0.9rem; font-weight: 500; margin-bottom: 2px; }
.notif-time { font-size: 0.78rem; color: var(--gray-400); }

/* ============ ROUTE PLANNER PANEL ============ */
.route-panel {
  position: fixed; bottom: 24px; right: 24px; z-index: 200;
  background: white; border: 2px solid var(--amber);
  border-radius: var(--radius-lg); padding: 16px;
  width: 280px; box-shadow: var(--shadow-xl);
}
.route-panel-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px; font-size: 0.95rem;
}
.route-count {
  background: var(--amber-light); color: var(--amber-dark);
  font-size: 0.75rem; font-weight: 700;
  padding: 2px 8px; border-radius: 100px; margin-left: 8px;
}
.route-stops-list { display: flex; flex-direction: column; gap: 6px; max-height: 160px; overflow-y: auto; margin-bottom: 12px; }
.route-stop-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.83rem; padding: 4px 0;
}
.route-stop-num {
  width: 20px; height: 20px; flex-shrink: 0;
  background: var(--amber); color: var(--dark);
  border-radius: 50%; font-size: 0.72rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.route-stop-title { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.route-stop-remove {
  background: none; border: none; cursor: pointer;
  color: var(--gray-400); font-size: 1rem; padding: 0 4px;
  line-height: 1;
}
.route-stop-remove:hover { color: var(--red); }
.route-panel-actions { display: flex; flex-direction: column; gap: 6px; }

/* ============ UPGRADE GATE CARD ============ */
.upgrade-gate-card {
  text-align: center; padding: 48px 32px;
  background: white; border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
  max-width: 480px; margin: 40px auto;
}
.upgrade-gate-card h3 { font-size: 1.3rem; margin-bottom: 8px; }
.upgrade-gate-card p { color: var(--gray-400); font-size: 0.95rem; }
.upgrade-modal-card { max-width: 400px; }

/* ============ PAGE SUBTITLE ============ */
.page-subtitle { color: var(--gray-400); font-size: 0.9rem; margin-top: 4px; }

/* ============ BADGE NOTIF COLOR ============ */
.notif-badge { background: var(--amber) !important; }

@media (max-width: 640px) {
  .msg-seller-cta { flex-direction: column; gap: 10px; }
  .thread-messages { max-height: 40vh; }
}
