/* --- 1. Root Variables, Fonts & Reset --- */
:root {
  --color-primary: #0056b3;     /* Strong Blue */
  --color-primary-light: #e8f3ff; /* Light Blue background for price */
  --color-primary-dark: #004085;
  --color-dark: #222;
  --color-text: #333;
  --color-text-light: #666;
  --color-bg: #f8f9fa;        /* Soft White/Gray background */
  --color-white: #ffffff;
  --shadow-light: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-dark: 0 2px 8px rgba(0,0,0,0.1);
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Lato', sans-serif;
  --border-radius-main: 10px;
  --border-radius-pill: 25px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
}

/* --- NEW Utility Class (for centering content) --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}


/* --- 2. NAVBAR --- */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--color-white);
  padding: 0.75rem 1.5rem;
  box-shadow: var(--shadow-light);
  position: relative;
  margin-bottom: 2rem;
}

.navbar .title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-dark);
}

.navbar .logo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.navbar .logo img {
  height: 40px;
}

.navbar .nav-links {
  display: flex;
  gap: 0.75rem;
}

.navbar .nav-links a {
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius-pill);
  background: transparent;
  color: var(--color-text-light);
  font-weight: 700;
  transition: all 0.3s ease;
}

.navbar .nav-links a:hover,
.navbar .nav-links a.current-page {
  background: var(--color-primary);
  color: var(--color-white);
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
  transition: all 0.3s ease;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--color-dark);
  border-radius: 5px;
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}


/* --- 3. VEHICLE PAGE CONTENT --- */

main {
  padding-bottom: 3rem;
}

.cars {
  text-align: center;
}

.cars h1 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  color: var(--color-dark);
}

.cars p {
  color: var(--color-text-light);
  margin-bottom: 2rem;
}

#carSearch {
  display: block;
  width: 100%;
  max-width: 400px;
  padding: 0.7rem 1rem;
  margin: 0 auto 2.5rem auto;
  border: 1px solid #ddd;
  border-radius: var(--border-radius-pill);
  font-size: 1rem;
  text-align: left;
  transition: all 0.3s ease;
}

#carSearch:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 8px rgba(0,86,179,0.18);
  outline: none;
}

.car-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

/* --- PROFESSIONAL CAR CARD STYLES --- */
.car-card {
  background: var(--color-white);
  border-radius: var(--border-radius-main);
  border: 1px solid #f0f0f0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.car-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

.car-card .image-container {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-top-left-radius: var(--border-radius-main);
  border-top-right-radius: var(--border-radius-main);
}

.car-card .image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.car-card:hover .image-container img {
  transform: scale(1.03);
}

/* Slider Arrows (Manually Controlled) */
.arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.45);
  color: var(--color-white);
  border: none;
  font-size: 1.2rem;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.2s ease;
  z-index: 10;
}

.arrow:hover {
  background: rgba(0,0,0,0.7);
}

.arrow.left { left: 10px; }
.arrow.right { right: 10px; }

.card-content {
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
}

.car-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid #ddd;
}

.car-header h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-dark);
  line-height: 1.4;
  margin-right: 1rem;
}

.car-header .price {
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--color-primary);
  font-size: 1.3rem;
  white-space: nowrap;
}

/* Details Grid Layout */
.car-details-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  text-align: center;
  margin-bottom: 1rem;
}

.detail-item {
  padding: 0.5rem 0.2rem;
  border-right: 1px solid #eee;
}

.detail-item:last-child {
  border-right: none;
}

.detail-item .icon {
  font-size: 1.4rem;
  display: block;
  margin-bottom: 0.2rem;
}

.detail-item .detail-value {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-dark);
  margin: 0;
}

.detail-item .detail-label {
  font-size: 0.75rem;
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
}

/* Other Infos (Extras) */
.extras {
  font-style: italic;
  color: #777;
  font-size: 0.85rem;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed #eee;
}

/* --- NEW Show More Button Style --- */
.btn-show-more {
    display: block; 
    text-align: center;
    text-decoration: none;
    
    background: var(--color-primary); 
    color: var(--color-white); 
    padding: 0.75rem 1rem;
    
    border-radius: var(--border-radius-main);
    font-size: 1rem;
    font-weight: 700;
    
    margin-top: 1.5rem; 
    transition: background 0.3s ease, transform 0.1s ease;
}

.btn-show-more:hover {
    background: var(--color-primary-dark); 
    transform: translateY(-1px); 
}

/* --- 5. Footer --- */
.footer {
  text-align: center;
  padding: 2rem 0;
  background: var(--color-white);
  color: var(--color-text-light);
  font-size: 0.9rem;
}


/* --- 6. Responsive (Mobile) --- */
@media (max-width: 768px) {
  .navbar {
    padding: 1rem;
  }
  
  .navbar .logo {
    display: none;
  }
  /* Mobile dropdown menu */
  .navbar .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--color-white);
    padding: 1rem;
    box-shadow: var(--shadow-light);
    gap: 0.5rem;
    z-index: 100;
  }
  .navbar .nav-links.active {
    display: flex;
  }
  .navbar .nav-links a {
    padding: 0.75rem;
    text-align: center;
  }
  .hamburger {
    display: flex;
  }
  
  .container {
    padding: 0 1rem;
  }
  
  .cars h1 {
    font-size: 2rem;
  }
}