/* ===========================================
   CSS Reset & Variables
   =========================================== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* Colors */
  --primary: #1E3A5F;
  --secondary: #3498db;
  --success: #27ae60;
  --danger: #e74c3c;
  --warning: #f39c12;
  --light: #f8f9fa;
  --dark: #34495e;
  --purple: #9b59b6;
  --gray: #7f8c8d;
  --border: #e9ecef;
  
  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
  --shadow: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 2px 10px rgba(0,0,0,0.1);
  --shadow-xl: 0 5px 15px rgba(0,0,0,0.2);
  
  /* Spacing & Transitions */
  --radius: 8px;
  --radius-sm: 5px;
  --transition: all 0.3s ease;
  --transition-fast: all 0.2s ease;
}

/* Base Styles */
body {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f4f6f9;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4 { color: var(--primary); }
h1 { font-size: 1.8rem; }
h2 { font-size: 2.5rem; text-align: center; margin-bottom: 3rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.3rem; }

/* Layout */
main { margin-top: 60px !important; }
section { padding: 80px 0; }
.alt-bg { background-color: var(--light); }

/* ===========================================
   HEADER STYLES - GHOST NAV LINKS
   =========================================== */
header {
  background-color: var(--primary);
  color: white;
  padding: 0 !important;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
  height: 58px;
}

/* ── Nav logo (shared across pages) ── */
.nav-logo { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; flex-shrink: 0; }
.nav-logo-icon { width: 32px; height: 32px; border-radius: 8px; background: rgba(255,255,255,0.15); display: flex; align-items: center; justify-content: center; }
.nav-logo-icon i { color: white; font-size: 0.85rem; }
.nav-logo-text { font-size: 1.05rem; font-weight: 800; color: white; letter-spacing: -0.3px; }
.nav-logo-text span { color: #7DD3FC; }

/* Three-column header layout (shared across all pages) */
.header-left  { display: flex; align-items: center; flex-shrink: 0; }
.header-center { display: flex; align-items: center; flex: 1; justify-content: center; }
.header-right  { display: flex; align-items: center; flex-shrink: 0; }

/* Center nav between logo and auth buttons on all pages */
header nav {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap !important;
  gap: 1rem;
  padding: 0 20px !important;
  max-width: 1400px !important;
  margin: 0 auto;
  height: 58px;
}

header h1 {
  margin: 0;
  font-size: 1.3rem !important;
  white-space: nowrap;
  color: white !important;
  font-weight: 800;
  letter-spacing: -0.3px;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 0.2rem !important;
  flex-wrap: nowrap !important;
  margin: 0;
  padding: 0;
  align-items: center;
}

nav ul li a {
  display: inline-flex !important;
  align-items: center;
  padding: 0.4rem 0.75rem !important;
  border: none !important;
  border-radius: 6px !important;
  background: transparent !important;
  color: rgba(255,255,255,0.82) !important;
  text-decoration: none !important;
  font-size: 0.82rem !important;
  font-weight: 500;
  transition: background 0.18s, color 0.18s !important;
  white-space: nowrap;
  text-align: center;
}

nav ul li a:hover {
  background: rgba(255,255,255,0.12) !important;
  color: white !important;
  border: none !important;
  transform: none !important;
  box-shadow: none !important;
}

nav ul li a.active {
  background: rgba(125,211,252,0.15) !important;
  color: #7DD3FC !important;
  border: none !important;
  font-weight: 700 !important;
}

/* Welcome message - always white text */
.welcome-message,
header .welcome-message,
header span[class*="welcome"],
header span[id*="welcome"],
header .user-info,
header .user-welcome,
#authLinks > span,
#authLinks .welcome-message {
  color: white !important;
  font-weight: 500;
  margin-right: 8px;
  font-size: 0.85rem;
  display: inline-block;
  background: none !important;
  border: none !important;
  padding: 0 !important;
}

/* Auth links — Login / Sign Up pill buttons */
#authLinks {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}
#authLinks a {
  display: inline-block;
  padding: 0.35rem 1rem !important;
  border: 2px solid white !important;
  border-radius: 8px !important;
  background: white !important;
  color: #1E3A5F !important;
  text-decoration: none !important;
  font-size: 0.82rem !important;
  font-weight: 700;
  transition: all 0.2s;
  white-space: nowrap;
}
#authLinks a:hover {
  background: #7DD3FC !important;
  border-color: #7DD3FC !important;
  color: #1E3A5F !important;
}

/* Global logout button — ghost style */
.logout-btn {
  background: transparent !important;
  color: rgba(255,255,255,0.82) !important;
  border: 1.5px solid rgba(255,255,255,0.35) !important;
  padding: 0.35rem 0.9rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  text-decoration: none;
}
.logout-btn:hover {
  background: rgba(255,255,255,0.12) !important;
  color: white !important;
  border-color: rgba(255,255,255,0.6) !important;
}

/* ===========================================
   UNREAD INDICATOR & READ ALL BUTTON
   =========================================== */
.unread-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 15px;
}

.unread-badge {
  background: #e74c3c;
  color: white;
  border-radius: 50%;
  min-width: 18px;
  height: 18px;
  font-size: 0.7rem;
  text-align: center;
  line-height: 18px;
  padding: 0 4px;
  display: inline-block;
}

.bell-icon {
  font-size: 1.2rem;
  cursor: pointer;
}

#readAllBtn {
  background: none;
  border: 1px solid #ddd;
  border-radius: 15px;
  padding: 2px 8px;
  cursor: pointer;
  font-size: 0.7rem;
}

#readAllBtn:hover {
  background: #f0f0f0;
}

/* ===========================================
   BUTTON STYLES (all except header)
   =========================================== */
.btn, .cta-button, .submit-btn, .cancel-btn,
.action-btn, .slide-button, .quick-action-btn,
.login-btn, .signup-btn, .dashboard-link, .logout-btn-nav,
.user-type-btn, .nav-button, .filter-btn, .filter-tab, 
.listing-type-btn, .create-listing-btn, .edit-btn,
.mark-sold-btn, .delete-btn, .mechanic-selection-btn,
.customer-selection-btn, .chat-history-btn,
.marketplace-btn, .seller-btn, .customer-btn, .mechanic-btn,
.primary-btn, .secondary-btn, .outline-btn,
.btn-primary, .action-btn, .extend-btn, .remove-btn,
.approve-btn, .view-details-btn, .buy-now-btn, .make-offer-btn,
.save-listing-btn, .send-message-btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border: 2px solid var(--secondary);
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  text-align: center;
  background: white !important;
  color: var(--secondary) !important;
  font-weight: 600 !important;
}

/* Hover and active states for all buttons */
.btn:hover, .cta-button:hover, .submit-btn:hover, .cancel-btn:hover,
.action-btn:hover, .slide-button:hover, .quick-action-btn:hover,
.login-btn:hover, .signup-btn:hover, .dashboard-link:hover, 
.logout-btn-nav:hover, .user-type-btn:hover, .nav-button:hover, 
.filter-btn:hover, .filter-tab:hover, .listing-type-btn:hover,
.create-listing-btn:hover, .edit-btn:hover, .mark-sold-btn:hover,
.delete-btn:hover, .mechanic-selection-btn:hover,
.customer-selection-btn:hover, .chat-history-btn:hover,
.marketplace-btn:hover, .seller-btn:hover, .customer-btn:hover, 
.mechanic-btn:hover, .primary-btn:hover, .secondary-btn:hover,
.outline-btn:hover, .btn-primary:hover, .action-btn:hover,
.extend-btn:hover, .remove-btn:hover, .approve-btn:hover,
.view-details-btn:hover, .buy-now-btn:hover, .make-offer-btn:hover,
.save-listing-btn:hover, .send-message-btn:hover,
.btn:active, .cta-button:active, .submit-btn:active, 
.action-btn:active, .slide-button:active, .quick-action-btn:active,
.login-btn:active, .signup-btn:active, .dashboard-link:active,
.user-type-btn:active, .nav-button:active, .filter-btn:active,
.filter-tab:active, .listing-type-btn:active,
.create-listing-btn:active, .edit-btn:active, .mark-sold-btn:active,
.customer-selection-btn:active, .mechanic-selection-btn:active,
.chat-history-btn:active, .marketplace-btn:active, .seller-btn:active,
.customer-btn:active, .mechanic-btn:active, .primary-btn:active,
.secondary-btn:active, .outline-btn:active, .btn-primary:active,
.action-btn:active, .extend-btn:active, .remove-btn:active,
.approve-btn:active, .view-details-btn:active, .buy-now-btn:active,
.make-offer-btn:active, .save-listing-btn:active, .send-message-btn:active,
.btn.active, .cta-button.active, .submit-btn.active, 
.action-btn.active, .slide-button.active, .quick-action-btn.active,
.login-btn.active, .signup-btn.active, .dashboard-link.active,
.user-type-btn.active, .nav-button.active, .filter-btn.active,
.filter-tab.active, .listing-type-btn.active,
.create-listing-btn.active, .edit-btn.active, .mark-sold-btn.active,
.customer-selection-btn.active, .mechanic-selection-btn.active,
.chat-history-btn.active, .marketplace-btn.active, .seller-btn.active,
.customer-btn.active, .mechanic-btn.active, .primary-btn.active,
.secondary-btn.active, .outline-btn.active, .btn-primary.active,
.action-btn.active, .extend-btn.active, .remove-btn.active,
.approve-btn.active, .view-details-btn.active {
  background: var(--secondary) !important;
  color: white !important;
  border-color: var(--secondary) !important;
}

/* Special styling for cancel buttons */
.cancel-btn {
  background: white !important;
  color: var(--danger) !important;
  border: 2px solid var(--danger) !important;
}
.cancel-btn:hover,
.cancel-btn:active {
  background: var(--danger) !important;
  color: white !important;
}

/* Special styling for delete/remove buttons */
.delete-btn, .remove-btn {
  background: white !important;
  color: var(--danger) !important;
  border: 2px solid var(--danger) !important;
}
.delete-btn:hover, .remove-btn:hover,
.delete-btn:active, .remove-btn:active {
  background: var(--danger) !important;
  color: white !important;
}

/* Special styling for approve/success buttons */
.approve-btn {
  background: white !important;
  color: var(--success) !important;
  border: 2px solid var(--success) !important;
}
.approve-btn:hover,
.approve-btn:active {
  background: var(--success) !important;
  color: white !important;
}

/* Special styling for create listing button */
.create-listing-btn {
  background: white !important;
  color: var(--success) !important;
  border: 2px solid var(--success) !important;
}
.create-listing-btn:hover,
.create-listing-btn:active {
  background: var(--success) !important;
  color: white !important;
}

/* Special styling for chat history button */
.chat-history-btn {
  background: white !important;
  color: var(--purple) !important;
  border: 2px solid var(--purple) !important;
}
.chat-history-btn:hover,
.chat-history-btn:active {
  background: var(--purple) !important;
  color: white !important;
}

/* ===========================================
   MAIN CONTENT ADJUSTMENT FOR SMALLER HEADER
   =========================================== */
main {
  margin-top: 60px !important;
}
.hero-slider {
  margin-top: 60px !important;
}

/* ===========================================
   Common Components (unchanged)
   =========================================== */
.card, .feature-card, .service-item, .dashboard-card,
.job-card, .sidebar-content, .ad-banner, .ad-rectangle {
  background: white;
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.card:hover, .feature-card:hover, .service-item:hover,
.dashboard-card:hover, .job-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}
.feature-card, .service-item { text-align: center; }

/* ===========================================
   GRID SYSTEMS (unchanged)
   =========================================== */
.grid, .features, .services-grid, .dashboard-grid, .quick-actions-grid {
  display: grid;
  gap: 2rem;
}
.grid-3, .features, .services-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.dashboard-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.quick-actions-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* ===========================================
   Hero Section (unchanged)
   =========================================== */
.hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 100px 0;
  text-align: center;
}
.hero h2 { font-size: 3rem; margin-bottom: 1rem; color: white; }
.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===========================================
   Lists (unchanged)
   =========================================== */
.services-list {
  list-style: none;
  max-width: 500px;
  margin: 0 auto;
}
.services-list li {
  background: white;
  padding: 1rem 2rem;
  margin-bottom: 1rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.services-list li:hover {
  transform: translateX(10px);
  background-color: var(--secondary);
  color: white;
}

/* ===========================================
   Forms (unchanged)
   =========================================== */
.form-group { margin-bottom: 1.5rem; }
label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
  color: var(--primary);
}
input, textarea, select {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  transition: border-color 0.3s ease;
  background: white;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--secondary);
}
.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2rem;
}

/* ===========================================
   Footer (unchanged)
   =========================================== */
footer {
  background-color: var(--dark);
  color: white;
  text-align: center;
  padding: 2rem 0;
}

/* ===========================================
   Job Cards & Status (unchanged)
   =========================================== */
.job-card { border-left: 4px solid var(--secondary); padding: 1rem; }
.job-card.pending { border-left-color: var(--warning); }
.job-card.completed { border-left-color: var(--success); }
.quote-form { margin-top: 1rem; padding: 1rem; background: var(--light); border-radius: var(--radius-sm); }

/* ===========================================
   Media & Gallery (unchanged)
   =========================================== */
.media-preview, .media-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.media-item, .gallery-item {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.media-item { width: 100px; height: 100px; }
.gallery-item { cursor: pointer; }
.media-item img, .media-item video,
.gallery-item img, .gallery-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.gallery-item:hover img, .gallery-item:hover video { transform: scale(1.05); }
.remove-media {
  position: absolute;
  top: 2px;
  right: 2px;
  background: rgba(231, 76, 60, 0.9);
  color: white;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  cursor: pointer;
  font-size: 12px;
}

/* ===========================================
   Comments (unchanged)
   =========================================== */
.comments-section {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.comment-form { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.comment-input { flex: 1; padding: 0.5rem; border: 1px solid #ddd; border-radius: var(--radius-sm); }
.comment-list { max-height: 200px; overflow-y: auto; }
.comment-item {
  background: var(--light);
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
}
.comment-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}
.comment-author { font-weight: bold; color: var(--primary); }
.comment-date { color: var(--gray); font-size: 0.8rem; }
.comment-content { color: var(--dark); }

/* ===========================================
   Location Services (unchanged)
   =========================================== */
.location-permission {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: 1rem;
  text-align: center;
}
.location-enabled {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  border-radius: var(--radius-sm);
  padding: 0.5rem 1rem;
  margin-bottom: 1rem;
  text-align: center;
  color: #155724;
}
.distance-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: bold;
  backdrop-filter: blur(10px);
}
.distance-badge.precise { background: rgba(39, 174, 96, 0.9); }
.distance-badge.approximate { background: rgba(243, 156, 18, 0.9); }
.distance-badge.area { background: rgba(52, 152, 219, 0.9); }
.distance-text {
  color: var(--success);
  font-weight: bold;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.sort-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: #e3f2fd;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.8rem;
  color: #1976d2;
  margin-left: 0.5rem;
}

/* ===========================================
   Notifications (dropdown – keep as is)
   =========================================== */
.notification-bell {
  position: relative;
  display: inline-block;
  margin-left: 15px;
}
.notification-count {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--danger);
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.notification-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  width: 300px;
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
}
.notification-item {
  padding: 10px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: background-color 0.2s;
}
.notification-item:hover { background-color: var(--light); }
.notification-item.unread { background-color: var(--light); font-weight: 500; }

/* ===========================================
   Chat History (unchanged)
   =========================================== */
.chat-history-section {
  margin: 1rem 0;
  padding: 1rem;
  background: var(--light);
  border-radius: var(--radius);
  border-left: 4px solid var(--secondary);
}
.chat-previews { display: flex; flex-direction: column; gap: 0.5rem; }
.chat-preview {
  padding: 0.75rem;
  background: white;
  border-radius: 6px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition-fast);
}
.chat-preview:hover {
  background: #e8f4fd;
  border-color: var(--secondary);
  transform: translateY(-1px);
}
.chat-customer { font-weight: 600; color: var(--primary); font-size: 0.9rem; }
.chat-last-message { color: #6c757d; font-size: 0.85rem; margin: 0.25rem 0; line-height: 1.3; }
.chat-time { color: #95a5a6; font-size: 0.75rem; text-align: right; }
.chat-more { text-align: center; padding: 0.5rem; color: var(--secondary); cursor: pointer; font-size: 0.85rem; font-weight: 500; }
.chat-more:hover { color: #2980b9; text-decoration: underline; }

/* ===========================================
   Ads (unchanged)
   =========================================== */
.ad-container { margin: 1rem 0; }
.header-ad-container { width: 100%; max-width: 728px; margin: 0 auto 1rem auto; height: 90px; }
.sidebar-ad-container { width: 100%; max-width: 300px; margin-bottom: 1.5rem; }
.ad-label {
  background: var(--light);
  color: var(--gray);
  font-size: 0.7rem;
  padding: 0.25rem 0.5rem;
  text-align: center;
  border-bottom: 1px solid #ecf0f1;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.ad-content { padding: 0.5rem; cursor: pointer; }

/* ===========================================
   Marketplace Layout (unchanged)
   =========================================== */
.marketplace-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}
.marketplace-main { min-width: 0; }
.marketplace-sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
}

/* ===========================================
   Dashboard (unchanged)
   =========================================== */
.mechanic-nav ul {
  display: flex;
  list-style: none;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  justify-content: center;
}
.mechanic-nav a {
  color: white;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background 0.3s ease;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.mechanic-nav a:hover,
.mechanic-nav a.active { background: var(--secondary); }
.dashboard-welcome {
  background: linear-gradient(135deg, var(--secondary), #2980b9);
  color: white;
  padding: 2rem;
  border-radius: 10px;
  margin-bottom: 2rem;
  text-align: center;
}
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}
.stat-item {
  text-align: center;
  padding: 1rem;
  background: var(--light);
  border-radius: var(--radius);
}
.stat-value {
  font-size: 2rem;
  font-weight: bold;
  color: var(--secondary);
  margin-bottom: 0.5rem;
}
.stat-label { color: var(--gray); font-size: 0.9rem; }
.quick-action-btn {
  background: white;
  border: 2px solid var(--secondary);
  color: var(--secondary);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.quick-action-btn:hover {
  background: var(--secondary);
  color: white;
  transform: translateY(-2px);
}

/* ===========================================
   Recent Activity (unchanged)
   =========================================== */
body.index-page .recent-activity {
  display: none !important;
}
.recent-activity { background: white; padding: 1.5rem; border-radius: 10px; box-shadow: var(--shadow-lg); }
.activity-list { list-style: none; padding: 0; margin: 0; }
.activity-item {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 1rem;
}
.activity-item:last-child { border-bottom: none; }
.activity-content { flex: 1; }
.activity-time { color: var(--gray); font-size: 0.85rem; }

/* ===========================================
   Hero Slider (unchanged)
   =========================================== */
.hero-slider {
  position: relative;
  width: 100%;
  height: 90vh;
  max-height: 700px;
  overflow: hidden;
  margin-top: 60px !important;
}
.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
}
.slide.active { opacity: 1; }
.slide-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 1;
}
.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 2;
}
.slide-content {
  position: relative;
  z-index: 3;
  color: white;
  text-align: center;
  padding: 0 20px;
  max-width: 800px;
  transform: translateY(20px);
  transition: transform 1s ease;
}
.slide.active .slide-content { transform: translateY(0); }
.slide-title { font-size: 3rem; font-weight: 700; margin-bottom: 20px; text-shadow: 2px 2px 4px rgba(0,0,0,0.5); line-height: 1.2; }
.slide-description { font-size: 1.2rem; margin-bottom: 30px; line-height: 1.6; text-shadow: 1px 1px 3px rgba(0,0,0,0.5); }

/* Slider Navigation */
.slider-nav {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 15px;
  z-index: 10;
}
.slider-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: var(--transition);
}
.slider-dot.active, .slider-dot:hover { background: white; }
.slider-dot.active { transform: scale(1.2); }
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition);
  backdrop-filter: blur(5px);
}
.slider-arrow:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-50%) scale(1.1);
}
.prev-arrow { left: 20px; }
.next-arrow { right: 20px; }

/* ===========================================
   Modal (unchanged)
   =========================================== */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
}
.modal-content {
  background-color: white;
  margin: 5% auto;
  padding: 2rem;
  border-radius: 10px;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
}
.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  position: absolute;
  right: 1rem;
  top: 1rem;
}
.close:hover { color: #000; }

/* ===========================================
   Mechanic Listings Specific Styles (unchanged)
   =========================================== */
.listings-container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 20px;
}
.listings-header {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white !important;
  padding: 2rem;
  border-radius: 10px;
  margin-bottom: 2rem;
}
.listings-header h1,
.listings-header p,
.listings-header .stat-card,
.listings-header .stat-value,
.listings-header .stat-label {
  color: white !important;
}
.listings-header .stat-value {
  color: white !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.listings-header .stat-label {
  color: rgba(255, 255, 255, 0.95) !important;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}
.stat-card {
  background: rgba(255, 255, 255, 0.1);
  padding: 1.5rem;
  border-radius: 10px;
  text-align: center;
  backdrop-filter: blur(10px);
  color: white !important;
}
.stat-value {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: white !important;
}
.stat-label {
  font-size: 0.9rem;
  opacity: 0.9;
  color: rgba(255, 255, 255, 0.95) !important;
}
.actions-bar {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  align-items: center;
}
.listing-type-btn {
  padding: 0.75rem 1.5rem;
  border: 2px solid #3498db;
  background: white;
  color: #3498db;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
}
.listing-type-btn.active {
  background: #3498db;
  color: white;
}
.listing-type-btn:hover {
  background: #2980b9;
  color: white;
}
.create-listing-btn {
  background: #27ae60 !important;
  color: white !important;
  margin-left: auto;
}
.create-listing-btn:hover {
  background: #219a52 !important;
}
.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}
.listing-card {
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.listing-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}
.listing-card-header {
  padding: 1.5rem;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.listing-info h3 {
  margin: 0 0 0.5rem 0;
  color: #2c3e50;
  font-size: 1.3rem;
}
.listing-type-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: bold;
  margin-left: 0.5rem;
}
.car-badge {
  background: #e67e22;
  color: white;
}
.repair-badge {
  background: #27ae60;
  color: white;
}
.inspection-badge {
  background: #1E3A5F;
  color: white;
}
.listing-status {
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: bold;
}
.status-active {
  background: #d4edda;
  color: #155724;
}
.status-sold {
  background: #fff3cd;
  color: #856404;
}
.status-completed {
  background: #d1ecf1;
  color: #0c5460;
}
.listing-card-body {
  padding: 1.5rem;
}
.listing-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1rem 0;
}
.spec-item {
  display: flex;
  flex-direction: column;
}
.spec-label {
  font-size: 0.8rem;
  color: #7f8c8d;
  margin-bottom: 0.25rem;
}
.spec-value {
  font-weight: bold;
  color: #2c3e50;
}
.price-section {
  text-align: center;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 5px;
  margin: 1rem 0;
}
.listing-price {
  font-size: 1.5rem;
  font-weight: bold;
  color: #27ae60;
}
.commission-note {
  font-size: 0.8rem;
  color: #7f8c8d;
  margin-top: 0.5rem;
}
.listing-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}
.action-btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background-color 0.3s ease;
}
.edit-btn {
  background: #3498db;
  color: white;
}
.edit-btn:hover {
  background: #2980b9;
}
.mark-sold-btn {
  background: #f39c12;
  color: white;
}
.mark-sold-btn:hover {
  background: #e67e22;
}
.delete-btn {
  background: #e74c3c;
  color: white;
}
.delete-btn:hover {
  background: #c0392b;
}
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: #7f8c8d;
}
.empty-state h3 {
  margin-bottom: 1rem;
  color: #2c3e50;
}
.gallery-section {
  margin: 1rem 0;
}
.media-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.gallery-item {
  position: relative;
  border-radius: 5px;
  overflow: hidden;
  cursor: pointer;
}
.gallery-item img, .gallery-item video {
  width: 100%;
  height: 100px;
  object-fit: cover;
}
.media-count {
  background: rgba(0,0,0,0.7);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 10px;
  font-size: 0.8rem;
  position: absolute;
  bottom: 5px;
  right: 5px;
}

/* ===========================================
   Modal Styles (unchanged)
   =========================================== */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
}
.modal-content {
  background-color: white;
  margin: 5% auto;
  padding: 2rem;
  border-radius: 10px;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
}
.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  position: absolute;
  right: 1rem;
  top: 1rem;
}
.close:hover {
  color: #000;
}
.form-group {
  margin-bottom: 1.5rem;
}
.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
  color: #2c3e50;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e9ecef;
  border-radius: 5px;
  font-size: 1rem;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #3498db;
  outline: none;
}
.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2rem;
}
.cancel-btn {
  background: #95a5a6;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 5px;
  cursor: pointer;
}
.cancel-btn:hover {
  background: #7f8c8d;
}
.submit-btn {
  background: #27ae60;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 5px;
  cursor: pointer;
}
.submit-btn:hover {
  background: #219a52;
}
.media-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.media-item {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: 5px;
  overflow: hidden;
}
.media-item img, .media-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.remove-media {
  position: absolute;
  top: 2px;
  right: 2px;
  background: rgba(231, 76, 60, 0.9);
  color: white;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  cursor: pointer;
  font-size: 12px;
}
.price-breakdown {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 5px;
  margin: 1rem 0;
}
.price-item {
  display: flex;
  justify-content: space-between;
  margin: 0.5rem 0;
}
.dynamic-fields {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 5px;
  margin: 1rem 0;
  border-left: 4px solid #3498db;
}

/* ===========================================
   Chat History Styles (unchanged)
   =========================================== */
.chat-history-section {
  margin: 1rem 0;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #3498db;
}
.chat-history-section h4 {
  margin: 0 0 0.5rem 0;
  color: #2c3e50;
  font-size: 1rem;
}
.chat-previews {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.chat-preview {
  padding: 0.75rem;
  background: white;
  border-radius: 6px;
  border: 1px solid #e9ecef;
  cursor: pointer;
  transition: all 0.2s ease;
}
.chat-preview:hover {
  background: #e8f4fd;
  border-color: #3498db;
  transform: translateY(-1px);
}
.chat-customer {
  font-weight: 600;
  color: #2c3e50;
  font-size: 0.9rem;
}
.chat-last-message {
  color: #6c757d;
  font-size: 0.85rem;
  margin: 0.25rem 0;
  line-height: 1.3;
}
.chat-time {
  color: #95a5a6;
  font-size: 0.75rem;
  text-align: right;
}
.chat-more {
  text-align: center;
  padding: 0.5rem;
  color: #3498db;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
}
.chat-more:hover {
  color: #2980b9;
  text-decoration: underline;
}
.chat-history-btn {
  background: #9b59b6 !important;
  border-color: #9b59b6 !important;
}
.chat-history-btn:hover {
  background: #8e44ad !important;
  border-color: #8e44ad !important;
}

/* ===========================================
   MECHANIC PROFILE STATS - LIGHT BLUE TEXT
   =========================================== */
.profile-stats .stat-number,
.profile-stats .stat-label {
  color: #5dade2 !important;
}
.profile-stats .stat-number {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}
.profile-stats .stat-label {
  font-size: 0.9rem;
}

/* ===========================================
   RESPONSIVE DESIGN
   =========================================== */
@media (max-width: 768px) {
  /* Layout Adjustments */
  header .container { flex-direction: column; text-align: center; }
  main { margin-top: 100px !important; }
  section { padding: 60px 0; }
  h2 { font-size: 2rem; margin-bottom: 2rem; }
  
  /* Navigation */
  nav ul { flex-direction: column; margin-top: 1rem; gap: 0.5rem; }
  nav li { margin: 0.5rem 0; }
  
  /* Header adjustments for mobile */
  header .container {
    padding: 0 10px !important;
    flex-wrap: wrap !important;
  }
  header h1 {
    font-size: 1rem !important;
  }
  nav ul {
    gap: 0.3rem !important;
  }
  nav ul li a {
    padding: 0.3rem 0.6rem !important;
    font-size: 0.75rem !important;
  }
  #authLinks a {
    padding: 0.3rem 0.6rem !important;
    font-size: 0.75rem !important;
  }
  
  /* Hero & Slider */
  .hero { padding: 80px 0; }
  .hero h2 { font-size: 2rem; }
  .hero-slider { height: 70vh; max-height: 500px; margin-top: 100px !important; }
  .slide-title { font-size: 2rem; }
  .slide-description { font-size: 1rem; margin-bottom: 20px; }
  .slider-arrow { width: 40px; height: 40px; font-size: 1rem; }
  .prev-arrow { left: 10px; }
  .next-arrow { right: 10px; }
  .slider-nav { bottom: 20px; }
  
  /* Grids */
  .grid-3, .features, .services-grid,
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-stats { grid-template-columns: repeat(2, 1fr); }
  .quick-actions-grid { grid-template-columns: 1fr; }
  
  /* Marketplace */
  .marketplace-layout { grid-template-columns: 1fr; gap: 1rem; }
  .marketplace-sidebar { position: static; order: -1; }
  
  /* Buttons */
  .hero-buttons { flex-direction: column; align-items: center; }
  .cta-button, .slide-button { width: 100%; max-width: 300px; }
  
  /* Ads */
  .header-ad-container { height: 50px; max-width: 320px; }
  .sidebar-ad-container { max-width: 100%; }
  
  /* Forms */
  .form-actions { flex-direction: column; }
  .form-actions .btn { width: 100%; }
}

@media (max-width: 480px) {
  /* Stack header elements vertically on very small screens */
  header .container {
    flex-direction: column;
    gap: 0.5rem;
  }
  nav ul {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap !important;
  }
  main {
    margin-top: 120px !important;
  }
  .hero-slider {
    margin-top: 120px !important;
  }
  /* Further mobile adjustments */
  .dashboard-stats { grid-template-columns: 1fr; }
  .hero-slider { height: 60vh; max-height: 400px; }
  .slide-title { font-size: 1.6rem; }
  .slide-description { font-size: 0.9rem; }
  .mechanic-nav a { font-size: 0.8rem; padding: 0.5rem; }
  .dashboard-welcome h1 { font-size: 1.5rem; }
  .stat-value { font-size: 1.5rem; }
}

/* ===========================================
   Form visibility (unchanged)
   =========================================== */
#listingForm:not(.approved) {
    opacity: 0.5;
    pointer-events: none;
}
.form-hidden {
    display: none !important;
}
.form-visible {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Loading animation (unchanged) */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
/* Badge on Messages button */
.nav-badge {
    position: absolute;
    top: -8px;
    right: -12px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    font-size: 0.7rem;
    font-weight: bold;
    text-align: center;
    line-height: 18px;
    padding: 0 4px;
    box-shadow: 0 0 2px rgba(0,0,0,0.2);
}
nav ul li {
    position: relative;
}