/* ── Reset & Base ────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif; background: #f8f9fa; color: #111827; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

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

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn-primary {
  display: inline-block; background: #003087; color: white;
  padding: 13px 28px; border-radius: 8px; font-weight: 700; font-size: 15px;
  border: none; cursor: pointer; transition: background 0.2s;
}
.btn-primary:hover { background: #00256e; }
.btn-secondary {
  display: inline-block; background: white; color: #003087;
  padding: 13px 28px; border-radius: 8px; font-weight: 700; font-size: 15px;
  border: 2px solid #003087; cursor: pointer; transition: all 0.2s;
}
.btn-secondary:hover { background: #003087; color: white; }
.btn-submit { width: 100%; margin-top: 8px; font-size: 16px; padding: 14px; }

/* ── Header ─────────────────────────────────────────────────────────────── */
header {
  background: white; border-bottom: 3px solid #003087;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.header-inner {
  max-width: 1200px; margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; gap: 24px;
}
.logo { line-height: 1.2; }
.logo-name { font-size: 22px; font-weight: 900; color: #003087; letter-spacing: -0.5px; }
.logo-auto { color: #f5a623; }
.logo-sub { font-size: 11px; color: #9ca3af; display: block; }
nav { display: flex; gap: 24px; margin-left: auto; }
nav a { font-size: 14px; font-weight: 600; color: #374151; transition: color 0.15s; }
nav a:hover { color: #003087; }
.btn-call {
  background: #f5a623; color: #111827; padding: 9px 18px;
  border-radius: 7px; font-weight: 700; font-size: 14px;
  white-space: nowrap; transition: background 0.2s;
}
.btn-call:hover { background: #e09614; }

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #001a5c 0%, #003087 60%, #004db5 100%);
  color: white; padding: 80px 20px;
}
.hero-inner { max-width: 700px; margin: 0 auto; text-align: center; }
.hero h1 { font-size: clamp(32px, 5vw, 52px); font-weight: 900; line-height: 1.15; margin-bottom: 16px; }
.hero h1 span { color: #f5a623; }
.hero p { font-size: 17px; color: rgba(255,255,255,0.82); margin-bottom: 32px; line-height: 1.7; }
.hero-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ── Inventory section ───────────────────────────────────────────────────── */
.inventory-section { padding: 40px 0; }

.filter-bar {
  display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px;
  background: white; padding: 16px; border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.filter-bar input, .filter-bar select {
  flex: 1; min-width: 150px; padding: 10px 12px;
  border: 1px solid #d1d5db; border-radius: 7px; font-size: 14px;
  background: white; color: #111827;
}
.filter-bar input:focus, .filter-bar select:focus {
  outline: none; border-color: #003087;
}
.filter-bar input { min-width: 220px; flex: 2; }

.inventory-count { font-size: 13px; color: #6b7280; margin-bottom: 16px; }

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

/* ── Vehicle card ────────────────────────────────────────────────────────── */
.vehicle-card {
  background: white; border-radius: 12px; overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08); transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}
.vehicle-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
.card-img { position: relative; aspect-ratio: 4/3; overflow: hidden; background: #f3f4f6; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.vehicle-card:hover .card-img img { transform: scale(1.03); }
.card-badge {
  position: absolute; top: 10px; left: 10px;
  background: rgba(0,0,0,0.65); color: white;
  font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 4px;
}
.card-badge.new-badge { background: #003087; }
.card-photos-btn {
  position: absolute; bottom: 10px; right: 10px;
  background: rgba(0,0,0,0.7); color: white;
  font-size: 11px; font-weight: 600; padding: 4px 10px;
  border-radius: 20px; backdrop-filter: blur(4px);
}
.card-body { padding: 16px; }
.card-title { font-size: 16px; font-weight: 700; color: #111827; margin-bottom: 4px; }
.card-trim  { font-size: 13px; color: #6b7280; margin-bottom: 10px; }
.card-meta  { display: flex; gap: 12px; font-size: 13px; color: #6b7280; margin-bottom: 12px; flex-wrap: wrap; }
.card-meta span::before { content: '·'; margin-right: 6px; }
.card-meta span:first-child::before { content: ''; margin-right: 0; }
.card-footer { display: flex; align-items: center; justify-content: space-between; }
.card-price { font-size: 22px; font-weight: 800; color: #003087; }
.card-dealer { font-size: 11px; color: #9ca3af; }
.card-inquire {
  background: #f5a623; color: #111827; border: none;
  padding: 8px 16px; border-radius: 7px; font-weight: 700; font-size: 13px;
  cursor: pointer; transition: background 0.15s;
}
.card-inquire:hover { background: #e09614; }
.no-photo { display: flex; align-items: center; justify-content: center; aspect-ratio: 4/3; background: #f3f4f6; color: #9ca3af; font-size: 14px; }

/* ── Modal ───────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  z-index: 1000; overflow-y: auto; padding: 20px;
  display: flex; align-items: flex-start; justify-content: center;
}
.modal-box {
  background: white; border-radius: 14px; width: 100%; max-width: 860px;
  position: relative; margin: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.modal-close {
  position: absolute; top: 14px; right: 14px; z-index: 10;
  background: rgba(0,0,0,0.5); color: white; border: none;
  width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
  font-size: 14px; font-weight: 700;
}
.modal-photos { position: relative; aspect-ratio: 16/9; background: #111; border-radius: 14px 14px 0 0; overflow: hidden; }
.modal-photos img { width: 100%; height: 100%; object-fit: cover; }
.photo-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.5); color: white; border: none; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; font-size: 18px; }
.photo-nav.prev { left: 10px; }
.photo-nav.next { right: 10px; }
.photo-counter { position: absolute; bottom: 10px; right: 10px; background: rgba(0,0,0,0.6); color: white; font-size: 12px; padding: 3px 10px; border-radius: 12px; }
.modal-body { padding: 24px; }
.modal-title { font-size: 24px; font-weight: 800; color: #111827; }
.modal-price { font-size: 28px; font-weight: 900; color: #003087; margin: 6px 0 16px; }
.modal-specs { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-bottom: 20px; }
.spec-item { background: #f8f9fa; border-radius: 7px; padding: 10px 12px; }
.spec-label { font-size: 11px; color: #9ca3af; text-transform: uppercase; letter-spacing: 0.5px; }
.spec-value { font-size: 14px; font-weight: 600; color: #111827; margin-top: 2px; }
.modal-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.modal-actions a, .modal-actions button {
  flex: 1; min-width: 150px; text-align: center;
  padding: 13px; border-radius: 8px; font-weight: 700; font-size: 15px;
  border: none; cursor: pointer;
}
.btn-call-modal { background: #003087; color: white; }
.btn-inquire-modal { background: #f5a623; color: #111827; }
.btn-notify-modal { background: #f8f9fa; color: #374151; border: 2px solid #d1d5db !important; }

/* ── Photo strip in modal ────────────────────────────────────────────────── */
.photo-strip { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0; margin-bottom: 16px; }
.photo-strip::-webkit-scrollbar { height: 4px; }
.photo-strip::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 2px; }
.photo-thumb-btn { flex-shrink: 0; width: 70px; height: 52px; border-radius: 5px; overflow: hidden; border: 2px solid transparent; cursor: pointer; transition: border-color 0.15s; }
.photo-thumb-btn.active { border-color: #003087; }
.photo-thumb-btn img { width: 100%; height: 100%; object-fit: cover; }

/* ── Waitlist section ────────────────────────────────────────────────────── */
.waitlist-section { background: #f0f4ff; padding: 70px 0; }
.section-header { text-align: center; margin-bottom: 36px; }
.section-header h2 { font-size: 32px; font-weight: 800; color: #111827; margin-bottom: 10px; }
.section-header p  { font-size: 16px; color: #6b7280; max-width: 560px; margin: 0 auto; }

.waitlist-form {
  background: white; border-radius: 14px; padding: 32px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08); max-width: 780px; margin: 0 auto;
}
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { font-size: 13px; font-weight: 600; color: #374151; }
.form-group input, .form-group select, .form-group textarea {
  padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 7px;
  font-size: 14px; font-family: inherit; color: #111827;
  transition: border-color 0.15s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: #003087;
}
.form-group textarea { resize: vertical; }
.form-msg { margin-top: 12px; font-size: 14px; font-weight: 600; }
.form-msg.success { color: #16a34a; }
.form-msg.error   { color: #dc2626; }

/* ── Contact / Ian section ───────────────────────────────────────────────── */
.contact-section { padding: 70px 0; background: white; }
.contact-inner {
  display: grid; grid-template-columns: auto 1fr auto; gap: 40px;
  align-items: start;
}
.ian-photo-wrap { text-align: center; }
.ian-photo {
  width: 180px; height: 180px; border-radius: 50%; object-fit: cover;
  object-position: center 15%;
  border: 4px solid #003087; box-shadow: 0 4px 20px rgba(0,48,135,0.2);
}
.ian-badge {
  display: inline-block; background: #f0f7ff; color: #003087;
  font-size: 12px; font-weight: 700; padding: 4px 10px;
  border-radius: 12px; margin-top: 10px;
}
.ian-info h2 { font-size: 28px; font-weight: 800; margin-bottom: 10px; }
.ian-info p  { color: #6b7280; font-size: 15px; line-height: 1.7; margin-bottom: 16px; }
.ian-details { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.ian-link { font-weight: 700; color: #003087; font-size: 15px; }
.ian-link:hover { text-decoration: underline; }
.ian-link-sep { color: #d1d5db; }
.dealers { display: flex; gap: 8px; }
.dealer-tag { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 5px; }
.dealer-tag.ford { background: #e0e7ff; color: #003087; }
.dealer-tag.chr  { background: #fef3c7; color: #92400e; }

.inquiry-form {
  background: #f8f9fa; border-radius: 12px; padding: 24px;
  border: 1px solid #e5e7eb; min-width: 300px;
}
.inquiry-form h3 { font-size: 18px; font-weight: 700; margin-bottom: 16px; }

/* ── Loading / states ────────────────────────────────────────────────────── */
.loading-state { grid-column: 1/-1; text-align: center; padding: 80px 20px; color: #6b7280; }
.spinner { width: 36px; height: 36px; border: 3px solid #e5e7eb; border-top-color: #003087; border-radius: 50%; animation: spin 0.7s linear infinite; margin: 0 auto 12px; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state { grid-column: 1/-1; text-align: center; padding: 60px 20px; }
.empty-state h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.empty-state p { color: #6b7280; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
footer { background: #111827; color: white; padding: 32px 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  nav { display: none; }
  .contact-inner { grid-template-columns: 1fr; }
  .ian-photo-wrap { display: flex; flex-direction: column; align-items: center; }
  .hero { padding: 50px 20px; }
  .hero-btns { flex-direction: column; align-items: center; }
  .vehicle-grid { grid-template-columns: 1fr; }
  .filter-bar input { min-width: 100%; flex: 1 1 100%; }
  .footer-inner { flex-direction: column; text-align: center; }
}
