/* =========
   VARIABLES
   ========= */
:root {
  --color-bg: #ffffff;
  --color-bg-elevated: #f8fafc;
  --color-bg-soft: #f1f5f9;
  --color-bg-accent: #e0f2fe;
  --color-border: #e2e8f0;
  --color-border-light: #f1f5f9;
  --color-primary: #2563eb;
  --color-primary-soft: rgba(37, 99, 235, 0.1);
  --color-primary-strong: #1d4ed8;
  --color-secondary: #059669;
  --color-secondary-soft: rgba(5, 150, 105, 0.1);
  --color-accent: #7c3aed;
  --color-text: #1e293b;
  --color-text-muted: #64748b;
  --color-text-light: #94a3b8;
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-error: #ef4444;

  --radius-xl: 24px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --radius-pill: 999px;

  --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-large: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.15);

  --transition-fast: 0.15s ease-out;
  --transition-med: 0.25s ease;
  --transition-slow: 0.4s ease;

  --gradient-primary: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
  --gradient-secondary: linear-gradient(135deg, #059669 0%, #10b981 100%);
  --gradient-accent: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: "Montserrat", "Roboto", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  color: var(--color-text);
  scroll-behavior: smooth;
  line-height: 1.6;
}

body {
  min-height: 100vh;
}

body {
  min-height: 100vh;
}

img {
  max-width: 100%;
  display: block;
}

main {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 96px 20px 64px;
}

/* =========
   LAYOUT
   ========= */
.main-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border-light);
  box-shadow: var(--shadow-soft);
  transition: all var(--transition-med);
}

.main-header:hover {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-medium);
}

.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  transition: transform var(--transition-fast);
}

.logo:hover {
  transform: scale(1.05);
}

.brand-name {
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 1.1rem;
  color: var(--color-text);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 0.95rem;
  font-weight: 500;
}

.main-nav a {
  color: var(--color-text-muted);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  position: relative;
  transition: all var(--transition-fast);
  font-weight: 500;
}

.main-nav a:hover {
  color: var(--color-primary);
  background-color: var(--color-primary-soft);
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: var(--radius-pill);
  transition: all var(--transition-med);
  transform: translateX(-50%);
}

.main-nav a:hover::after {
  width: 80%;
}
  transition: width var(--transition-fast);
}

.main-nav a:hover {
  color: var(--color-text);
}

.main-nav a:hover::after {
  width: 100%;
}

/* =========
   BUTTONS
   ========= */
.btn {
  border-radius: var(--radius-lg);
  padding: 12px 24px;
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--transition-med);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left var(--transition-slow);
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: var(--shadow-medium);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-large);
}

.btn-secondary {
  background: var(--color-bg-elevated);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-soft);
}

.btn-secondary:hover {
  background: var(--color-bg);
  transform: translateY(-1px);
  box-shadow: var(--shadow-medium);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
  font-weight: 600;
}

.btn-outline:hover {
  background: var(--color-primary);
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}

.full-width {
  width: 100%;
}

/* =========
   HERO
   ========= */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 60px;
  align-items: center;
  padding: 80px 32px 80px;
  background: linear-gradient(135deg, #f8fafc 0%, #e0f2fe 50%, #f0f9ff 100%);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%232563eb' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-content h1 {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  line-height: 1.1;
  margin-bottom: 20px;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.project-title {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-primary);
  font-weight: 600;
  margin-bottom: 16px;
  display: inline-block;
  padding: 8px 16px;
  background: var(--color-primary-soft);
  border-radius: var(--radius-pill);
}

.hero-subtitle {
  color: var(--color-text-muted);
  max-width: 520px;
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.hero-image {
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.hero-card {
  width: 100%;
  max-width: 450px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.95) 100%);
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  box-shadow: var(--shadow-large);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--color-border-light);
  backdrop-filter: blur(20px);
}

.hero-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-primary);
  opacity: 0.05;
  border-radius: inherit;
}

.hero-stats {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 20px;
}

.hero-stats div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
  flex: 1;
}

.stat-number {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-car {
  position: relative;
  z-index: 1;
  margin-top: 20px;
  display: flex;
  justify-content: center;
}

.hero-car-body {
  height: 160px;
  width: 280px;
  border-radius: 80px;
  background: var(--gradient-primary);
  position: relative;
  box-shadow: var(--shadow-large);
}

.hero-car-body::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 20px;
  right: 20px;
  bottom: 20px;
  background: white;
  border-radius: 60px;
  box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.1);
}

.hero-car-glow {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.3) 0%, transparent 70%);
  border-radius: 50%;
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: translateX(-50%) scale(1);
    opacity: 0.5;
  }
  50% {
    transform: translateX(-50%) scale(1.1);
    opacity: 0.8;
  }
  background: linear-gradient(135deg, #f5f5f7, #b7bcc8);
  box-shadow: 0 25px 48px rgba(0, 0, 0, 0.85);
  position: relative;
}

.hero-car-body::before,
.hero-car-body::after {
  content: "";
  position: absolute;
  bottom: -22px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff, #9ea1aa 50%, #383c48 75%, #111218 100%);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.9);
}

.hero-car-body::before {
  left: 40px;
}

.hero-car-body::after {
  right: 40px;
}

.hero-car-glow {
  width: 80%;
  height: 26px;
  background: radial-gradient(circle at center, rgba(229, 9, 20, 0.4), transparent 65%);
  margin: 0 auto;
  filter: blur(2px);
}

/* =========
   SECTIONS
   ========= */
.section-header {
  margin-top: 72px;
  margin-bottom: 18px;
}

.section-header h2 {
  font-size: 1.4rem;
  margin: 0 0 4px;
}

.section-header p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* =========
   SEARCH / FILTERS
   ========= */
.search-section {
  margin-top: 60px;
  padding: 0 32px;
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-header h2 {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 12px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-header p {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto;
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.95) 100%);
  padding: 32px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border-light);
  box-shadow: var(--shadow-large);
  backdrop-filter: blur(20px);
  position: relative;
}

.filters-grid::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-primary);
  opacity: 0.02;
  border-radius: inherit;
  pointer-events: none;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.9rem;
  position: relative;
  z-index: 1;
}

.field-group label {
  color: var(--color-text);
  font-weight: 600;
  font-size: 0.95rem;
}

.field-group input,
.field-group select,
.field-group textarea {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  border: 2px solid var(--color-border);
  padding: 14px 16px;
  color: var(--color-text);
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  transition: all var(--transition-med);
  box-shadow: var(--shadow-soft);
}

.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-soft);
  transform: translateY(-1px);
}

.field-group input::placeholder,
.field-group textarea::placeholder {
  color: var(--color-text-light);
}

.field-group--button {
  display: flex;
  align-items: flex-end;
}

/* =========
   CATALOGUE
   ========= */
.catalogue {
  margin-top: 40px;
}

.cars-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 14px;
}

.car-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.95) 100%);
  border-radius: var(--radius-xl);
  padding: 20px;
  border: 1px solid var(--color-border-light);
  box-shadow: var(--shadow-medium);
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-med);
  backdrop-filter: blur(10px);
}

.car-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity var(--transition-med);
  pointer-events: none;
  border-radius: inherit;
}

.car-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-large);
  border-color: var(--color-primary);
}

.car-card:hover::before {
  opacity: 0.05;
}

.car-image-wrapper {
  height: 220px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: var(--shadow-soft);
}

.car-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-med);
}

.car-card:hover .car-image-wrapper img {
  transform: scale(1.05);
}

.car-image-overlay {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
}

.car-year-badge {
  background: var(--gradient-primary);
  color: #fff;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: var(--shadow-medium);
  backdrop-filter: blur(10px);
}

.car-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.car-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.3;
  flex: 1;
}

.car-price {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--color-primary);
  white-space: nowrap;
}

.car-price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-primary-strong);
}

.car-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.car-meta span {
  background: rgba(13, 13, 18, 0.9);
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.car-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
  padding: 8px;
  background: rgba(8, 8, 12, 0.6);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.car-detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}

.car-detail-label {
  color: var(--color-text-muted);
  font-weight: 500;
}

.car-detail-value {
  color: var(--color-text);
  font-weight: 600;
}

.car-description-preview {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  line-height: 1.4;
  margin-top: 4px;
  padding: 6px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.car-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  gap: 6px;
  flex-wrap: wrap;
}

.favorite-toggle {
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  border-radius: 999px;
  transition: background var(--transition-fast), color var(--transition-fast),
    transform var(--transition-fast);
}

.favorite-toggle span {
  font-size: 1.1rem;
}

.favorite-toggle.active {
  color: var(--color-primary-strong);
  background: rgba(229, 9, 20, 0.15);
  transform: translateY(-1px);
}

.compare-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.compare-toggle input {
  accent-color: var(--color-primary-strong);
}

.no-results {
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.hidden {
  display: none !important;
}

/* =========
   COMPARISON
   ========= */
.comparison-section {
  margin-top: 56px;
}

.comparison-container {
  margin-top: 14px;
  background: radial-gradient(circle at top, #20212b, #111119 55%, #050507);
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(255, 255, 255, 0.18);
  padding: 12px 16px 16px;
  overflow-x: auto;
}

.comparison-container.empty {
  display: flex;
  align-items: center;
  min-height: 70px;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.comparison-table th,
.comparison-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.comparison-table th {
  color: var(--color-text-muted);
  font-weight: 500;
}

.comparison-label {
  color: var(--color-text-muted);
  white-space: nowrap;
}

/* =========
   SELLER / DASHBOARD
   ========= */
.seller-section {
  margin-top: 64px;
}

.seller-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.2fr);
  gap: 22px;
  margin-top: 18px;
}

.card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.95) 100%);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border-light);
  box-shadow: var(--shadow-large);
  padding: 32px;
  backdrop-filter: blur(20px);
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-primary);
  opacity: 0.02;
  border-radius: inherit;
  pointer-events: none;
}

.card h3 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-text);
  position: relative;
  z-index: 1;
}

.muted {
  margin: 0 0 16px;
  font-size: 0.95rem;
  color: var(--color-text-muted);
  position: relative;
  z-index: 1;
  line-height: 1.5;
}

.seller-ads-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 320px;
  overflow-y: auto;
  position: relative;
  z-index: 1;
}

.seller-ad-item {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  font-size: 0.9rem;
  box-shadow: var(--shadow-soft);
  transition: all var(--transition-med);
}

.seller-ad-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
  border-color: var(--color-primary);
}

.seller-ad-main {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.seller-ad-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-text);
}

.seller-ad-meta {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.seller-ad-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.seller-ad-actions button {
  font-size: 0.75rem;
  padding-inline: 10px;
}

/* =========
   CONTACT
   ========= */
.contact-section {
  margin-top: 70px;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 22px;
  margin-top: 18px;
}

.contact-details {
  list-style: none;
  padding: 0;
  margin: 10px 0 14px;
  font-size: 0.9rem;
}

.contact-details li {
  margin-bottom: 4px;
}

.map-placeholder {
  margin-top: 6px;
  padding: 10px;
  background: linear-gradient(135deg, rgba(32, 32, 44, 0.9), rgba(14, 14, 20, 0.96));
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.24);
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.contact-form .form-success {
  margin-top: 8px;
  font-size: 0.8rem;
  color: #7dd87d;
}

/* =========
   FOOTER
   ========= */
.main-footer {
  width: 100%;
  padding: 40px 32px 32px;
  border-top: 1px solid var(--color-border-light);
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.95) 0%, rgba(241, 245, 249, 0.95) 100%);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  position: relative;
}

.main-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-primary);
  opacity: 0.02;
  pointer-events: none;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.footer-logo {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  object-fit: cover;
  box-shadow: var(--shadow-soft);
  transition: transform var(--transition-fast);
}

.footer-logo:hover {
  transform: scale(1.05);
}

.footer-brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-text);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 24px;
  position: relative;
  z-index: 1;
}

.footer-links a {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: all var(--transition-fast);
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius-md);
}

.footer-links a:hover {
  color: var(--color-primary);
  background: var(--color-primary-soft);
}

/* =========
   MODAL
   ========= */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
}

.modal-content {
  position: relative;
  z-index: 1;
  width: min(880px, 93%);
  max-height: 86vh;
  background: linear-gradient(135deg, #171824, #0b0c12);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.9);
  padding: 18px 18px 20px;
  overflow: hidden;
}

.modal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr);
  gap: 18px;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 1.6rem;
  cursor: pointer;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.modal-close:hover {
  color: var(--color-primary-strong);
  transform: rotate(4deg);
}

.modal-gallery {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-gallery img {
  border-radius: 18px;
  height: 260px;
  object-fit: cover;
  background: radial-gradient(circle at top left, #343646, #11121a);
}

.modal-thumbs {
  display: flex;
  gap: 8px;
}

.modal-thumbs img {
  width: 62px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
  cursor: pointer;
  opacity: 0.8;
  border: 1px solid transparent;
  transition: opacity var(--transition-fast), transform var(--transition-fast),
    border-color var(--transition-fast);
}

.modal-thumbs img:hover {
  opacity: 1;
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.3);
}

.modal-details h2 {
  margin: 4px 0;
  font-size: 1.3rem;
}

.modal-price {
  color: var(--color-primary-strong);
  font-size: 1.1rem;
  font-weight: 600;
}

.modal-desc {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.modal-specs {
  list-style: none;
  padding: 0;
  margin: 10px 0 14px;
  font-size: 0.9rem;
}

.modal-specs li {
  margin-bottom: 4px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* =========
   TOAST
   ========= */
.toast {
  position: fixed;
  right: 16px;
  bottom: 18px;
  background: rgba(14, 14, 20, 0.98);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 10px 14px;
  font-size: 0.85rem;
  color: var(--color-text);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.8);
  z-index: 110;
}

/* ===============
   ANIMATIONS & EFFECTS
   =============== */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Appliquer les animations d'entrée */
.hero-content {
  animation: fadeInLeft 0.8s ease-out;
}

.hero-image {
  animation: fadeInRight 0.8s ease-out 0.2s both;
}

.search-section {
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.car-card {
  animation: scaleIn 0.6s ease-out both;
}

.car-card:nth-child(1) { animation-delay: 0.1s; }
.car-card:nth-child(2) { animation-delay: 0.2s; }
.car-card:nth-child(3) { animation-delay: 0.3s; }
.car-card:nth-child(4) { animation-delay: 0.4s; }
.car-card:nth-child(5) { animation-delay: 0.5s; }
.car-card:nth-child(6) { animation-delay: 0.6s; }

/* Smooth scrolling amélioré */
html {
  scroll-behavior: smooth;
}

/* Améliorer l'accessibilité */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Focus visible pour l'accessibilité */
.btn:focus-visible,
.field-group input:focus-visible,
.field-group select:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Loading state */
.loading {
  opacity: 0.6;
  pointer-events: none;
  position: relative;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--color-primary);
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.image-upload-area {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  background-color: var(--color-bg-soft);
}

.image-upload-area:hover {
  border-color: var(--color-accent);
  background-color: var(--color-bg-elevated);
}

.image-upload-placeholder-seller {
  color: var(--color-text-muted);
  pointer-events: none;
}

.image-upload-placeholder-seller p {
  margin: 0;
  font-weight: 600;
  color: var(--color-text);
}

.image-upload-placeholder-seller small {
  display: block;
  margin-top: 5px;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

/* ===============
   RESPONSIVE
   =============== */
@media (max-width: 960px) {
  .main-header {
    padding-inline: 20px;
    gap: 16px;
  }

  .main-nav {
    display: none;
  }

  main {
    padding-inline: 20px;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
    padding: 60px 20px;
  }

  .hero-content {
    text-align: center;
  }

  .hero-actions {
    justify-content: center;
  }

  .filters-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 24px;
  }

  .cars-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .car-image-wrapper {
    height: 200px;
  }

  .seller-layout,
  .contact-layout,
  .modal-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .modal-gallery img {
    height: 220px;
  }

  .section-header h2 {
    font-size: 2rem;
  }
}

@media (max-width: 640px) {
  .main-header {
    padding: 16px 16px;
    flex-wrap: wrap;
  }

  .logo-wrapper {
    gap: 8px;
  }

  .logo {
    width: 32px;
    height: 32px;
  }

  .brand-name {
    font-size: 0.9rem;
  }

  main {
    padding-inline: 16px;
  }

  .hero {
    padding: 40px 16px;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-card {
    padding: 24px 20px;
  }

  .filters-grid {
    grid-template-columns: minmax(0, 1fr);
    padding: 20px;
    gap: 16px;
  }

  .cars-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .car-card {
    padding: 16px;
  }

  .car-image-wrapper {
    height: 180px;
  }

  .card {
    padding: 24px 20px;
  }

  .main-footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 32px 16px;
    gap: 16px;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
  }

  .section-header h2 {
    font-size: 1.5rem;
  }

  .section-header p {
    font-size: 1rem;
  }
}

