:root {
  --primary-color: #f97316;
  --secondary-color: #1e293b;
  --accent-color: #f59e0b;
  --bg-light: #f8fafc;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.2), 0 5px 15px rgba(0, 0, 0, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Entrance Animations */ [data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Global Page Loader */ .page-loader {
  position: fixed;
  inset: 0;
  background: #ffffff;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s;
}

.page-loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-spinner {
  width: 50px;
  height: 50px;
  border: 5px solid var(--bg-light);
  border-top: 5px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.car-listing-page {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text-main);
  line-height: 1.6;
  background-color: #fff;
}

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

/* Hero Section */ .lp-hero {
  min-height: 100dvh;
  display: flex;
  position: relative;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  background: linear-gradient(rgba(15, 23, 42, 0.15), rgba(15, 23, 42, 0.15)), url('https://images.unsplash.com/photo-1492144534655-ae79c964c9d7?auto=format&fit=crop&q=80&w=1600') center/cover no-repeat;
  color: white;
}

.lp-hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 900;
  margin-bottom: 16px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.lp-hero p {
  font-size: 1.25rem;
  max-width: 650px;
  margin: 0 auto;
  opacity: 0.9;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
}

/* How it Works */ .how-it-works {
  padding: 80px 0;
  background: var(--secondary-color);
  color: white;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px;
  margin-top: 40px;
}

.step-item h3 {
  font-size: 1.5rem;
  margin: 15px 0;
}

.step-number {
  width: 40px;
  height: 40px;
  background: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

/* Why Choose Us */ .why-us {
  padding: 80px 0;
  background: white;
  text-align: center;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px;
  margin-top: 50px;
}

.why-card {
  text-align: center;
}

.why-card i {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.why-card h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
  color: var(--secondary-color);
}

.why-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Loan Calculator */ .loan-calculator {
  padding: 80px 0;
  background: white;
}

.calc-container {
  background: var(--bg-light);
  padding: 40px;
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.calc-form {
  flex: 2;
  min-width: 300px;
}

.calc-result-card {
  flex: 1;
  min-width: 280px;
  background: var(--primary-color);
  color: white;
  border-radius: 16px;
  padding: 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 24px;
}

.calc-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-muted);
}

.calc-field input {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  font-size: 1rem;
}

/* Featured Listings — same card structure as the Listings page */ .car-grid {
  padding: 0 0 16px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.lp-listings {
  padding-top: 80px;
}

.lp-listings .car-grid {
  padding-bottom: 16px;
}

.featured-listings-cta {
  margin-top: 8px;
  text-align: center;
}

.car-card {
  overflow: hidden;
  border-radius: 15px;
  background: var(--secondary-color);
  box-shadow: 0 7px 21px rgba(15, 23, 42, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: block;
  text-decoration: none;
}

.car-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
}

.car-card .media {
  position: relative;
}

.car-img {
  display: block;
  width: 100%;
  height: 220px;
  background: #cbd5e1;
  object-fit: cover;
  object-position: center;
}

.photo-count {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.8);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1;
}

.photo-count svg {
  width: 15px;
  height: 15px;
}

.car-info {
  padding: 19px;
}

.car-title {
  margin: 0 0 15px;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.car-specs {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 12px;
  margin-top: 4px;
}

.car-specs span {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #e2e8f0;
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1;
  text-align: left;
}

.car-specs span::before {
  content: '';
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: var(--primary-color);
}

.car-specs i {
  color: var(--primary-color);
  font-size: 1rem;
}

.car-price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  margin: 15px -19px -19px;
  padding: 14px 19px 19px;
}

.car-price {
  color: var(--primary-color);
  font-size: 1.05rem;
  font-weight: 850;
}

.down-payment {
  color: #cbd5e1;
  font-size: 0.8rem;
  white-space: nowrap;
}

.down-payment strong {
  color: #fff;
  font-size: 0.88rem;
}

@media (max-width: 1024px) {
  .car-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .steps-grid, .why-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .car-grid {
    grid-template-columns: 1fr;
  }
  .car-img {
    height: 235px;
  }
  .car-price-row {
    gap: 8px;
  }
  .down-payment {
    font-size: 0.75rem;
  }
}

/* Category Slider */
/* Testimonials — same card/container language as vehicle cards */ .test-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.testimonials {
  padding-bottom: 80px;
}

.test-card {
  overflow: hidden;
  border-radius: 15px;
  background: #fff;
  border: 1px solid #f1f5f9;
  box-shadow: 0 7px 21px rgba(15, 23, 42, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  padding: 24px;
}

.test-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
}

.test-stars {
  color: var(--accent-color);
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.test-card p {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-main);
  margin: 0 0 24px;
  flex-grow: 1;
}

.test-author {
  display: flex;
  align-items: flex-start;
  gap: 0;
  border-top: 1px solid #eef2f7;
  padding-top: 16px;
}

.test-author > div:last-child, .test-author > div:first-child {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}

.test-author strong {
  color: var(--text-main);
  font-size: 0.95rem;
  line-height: 1.2;
}

.test-author span {
  display: block;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.2;
}

.test-avatar {
  display: none !important;
}

.reviews-cta {
  margin-top: 40px;
  text-align: center;
}

.reviews-cta[hidden] {
  display: none;
}

.reviews-cta .btn-search {
  display: inline-block;
  padding: 12px 40px;
  text-decoration: none;
}

@media (max-width: 700px) {
  .lp-listings {
    padding-top: 48px;
  }

  .testimonials {
    padding-bottom: 64px;
  }

  .test-grid {
    grid-template-columns: 1fr;
  }
}

/* FAQ Section */ .lp-faq {
  padding: 80px 0;
  background: var(--bg-light);
}

.faq-accordion {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  align-items: start;
  margin: 0 auto;
}

.faq-item {
  background: white;
  border-radius: 16px;
  margin-bottom: 0;
  border: 1px solid #f1f5f9;
  transition: all 0.3s ease;
}

.faq-question {
  width: 100%;
  padding: 20px 24px;
  background: none;
  border: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  text-align: left;
}

.faq-question i {
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: transform 0.3s ease;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease-out;
}

.faq-answer p {
  padding: 0 24px 20px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.faq-item.active {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
  background: #fff;
}

.faq-item.active .faq-question i {
  transform: rotate(180deg);
  color: var(--primary-color);
}

.test-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.test-stars {
  color: var(--accent-color);
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.test-card p {
  font-size: 1rem;
  color: var(--text-main);
  margin-bottom: 24px;
  flex-grow: 1;
}

.test-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.test-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--primary-color);
  font-size: 0.85rem;
}

.test-info strong {
  display: block;
  font-size: 0.95rem;
  line-height: 1.2;
  color: var(--text-main);
}

.test-info span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Buttons */ .btn {
  padding: 10px 24px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: background 0.3s ease, transform 0.2s ease;
}

.btn-primary {
  background: var(--primary-color);
  color: #ffffff;
  padding: 10px 24px;
  border-radius: 6px;
}

.btn-primary:hover {
  background: var(--accent-color);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: white;
  border: 2px solid white;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-outline:hover {
  background: white;
  color: var(--primary-color);
}

.btn-search {
  background: var(--primary-color);
  color: white;
  border: none;
  align-self: flex-end;
  padding: 10px 32px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

.btn-search.loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.btn-search.loading::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  margin: -10px 0 0 -10px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loader-text {
  margin-top: 20px;
  color: var(--text-main);
  font-size: 1.1rem;
  font-weight: 500;
}

.btn-search:hover {
  background: var(--accent-color);
  transform: translateY(-1px);
}

#no-results {
  text-align: center;
  padding: 60px 20px;
  background: white;
  border-radius: 16px;
  margin-bottom: 30px;
  box-shadow: var(--shadow-sm);
  border: 1px solid #f1f5f9;
}

#no-results i {
  font-size: 3rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  display: block;
}

.view-all-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: 0.2s;
}

.view-all-link:hover {
  gap: 10px;
}

/* Responsive Breakpoints */ @media (max-width: 768px) {
  .lp-hero {
    min-height: 70vh;
    padding: 60px 0;
  }
  .lp-hero h1 {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
  }
  .lp-hero p {
    font-size: 1rem;
  }
  .how-it-works {
    padding-top: 100px;
  }
  .faq-accordion {
    grid-template-columns: 1fr;
  }
  .test-grid {
    /* Stack testimonials on smaller screens */ grid-template-columns: 1fr;
    gap: 20px;
  }
  /* Calculator section mobile padding */ .loan-calculator {
    padding: 40px 0;
  }
  .calc-container {
    padding: 20px;
    gap: 16px;
    flex-direction: column;
  }
  .calc-form {
    flex: 1 100%;
    min-width: auto;
  }
  .calc-result-card {
    padding: 24px;
    min-width: auto;
    flex: 1 100%;
  }
  .calc-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .steps-grid, .why-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* Extra small screens */ @media (max-width: 480px) {
  .calc-grid {
    grid-template-columns: 1fr;
  }
}

/* Desktop styles for category slider with arrows */ @media (min-width: 769px) {
}

/* Skeleton Loader */ .skeleton {
  background: linear-gradient(90deg, #2d3748 0%, #4a5568 50%, #2d3748 100%);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.skeleton-card {
  background: var(--secondary-color);
  border-radius: 16px;
  overflow: hidden;
  display: block;
}

.skeleton-img {
  width: 100%;
  aspect-ratio: 1.6;
}

.skeleton-info {
  padding: 20px;
}

.skeleton-price {
  height: 28px;
  margin-bottom: 12px;
  border-radius: 6px;
}

.skeleton-title {
  height: 24px;
  margin-bottom: 12px;
  border-radius: 6px;
}

.skeleton-specs {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.skeleton-spec-item {
  height: 16px;
  flex: 1;
  border-radius: 4px;
}

/* Testimonial Skeletons */ .skeleton-test-card {
  padding: 32px;
  border-radius: 16px;
  background: white;
  border: 1px solid #f1f5f9;
  display: flex;
  flex-direction: column;
}

.skeleton-test-stars {
  height: 16px;
  width: 80px;
  margin-bottom: 16px;
  border-radius: 4px;
}

.skeleton-test-text {
  height: 60px;
  margin-bottom: 24px;
  border-radius: 8px;
}

.skeleton-test-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.skeleton-test-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.skeleton-test-name {
  height: 16px;
  width: 100px;
  margin-bottom: 4px;
  border-radius: 4px;
}

.skeleton-test-loc {
  height: 12px;
  width: 120px;
  border-radius: 4px;
}

/* Testimonial Truncation & Modal */ .test-card p {
  font-size: 1rem;
  color: var(--text-main);
  margin-bottom: 12px;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.review-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.9);
  z-index: 5000;
  padding: 20px;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}

.review-modal.active {
  display: flex;
}

.review-modal .modal-content {
  background: white;
  padding: 40px;
  border-radius: 20px;
  max-width: 600px;
  width: 100%;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

.modal-close:hover {
  color: var(--primary-color);
}

/* Empty State */ .empty-state {
  text-align: center;
  padding: 80px 20px;
  background: var(--bg-light);
  border-radius: 16px;
  display: none;
}

.empty-state.show {
  display: block;
}

.testimonials .empty-state:not([hidden]) {
  display: block;
}

.empty-state i {
  font-size: 3rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  display: block;
}

.empty-state h3 {
  color: var(--text-main);
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--text-muted);
  margin-bottom: 24px;
}

.car-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
