/* Common Styles for infoCAR Standalone */

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

:root {
  --background: #ffffff;
  --foreground: #1f2937;
  --primary: #10b981;
  --primary-hover: #059669;
  --primary-foreground: #ffffff;
  --secondary: #f4f5f7;
  --muted: #f0f1f3;
  --muted-foreground: #6b7280;
  --border: #e5e7eb;
  --radius: 0.75rem;
  --card: #ffffff;
  --card-foreground: #1f2937;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.logo-icon {
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--foreground);
}

.logo .logo-accent {
  color: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-link:hover, .nav-link.active {
  color: var(--foreground);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  border: none;
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
}

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

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--foreground);
}

.btn-outline:hover {
  background: var(--secondary);
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

/* Footer */
.footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer-links {
  display: flex;
  gap: 1rem 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-link {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-link:hover {
  color: var(--foreground);
}

.footer-copy {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* Mobile Menu */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--foreground);
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  
  .mobile-menu-btn {
    display: block;
  }
}

.mobile-menu {
  display: none;
  padding-top: 0.375rem;
  padding-bottom: 0.5rem;
  border-top: 1px solid var(--border);
}

.mobile-menu.open {
  display: block;
}

.mobile-menu .nav-link {
  display: block;
  padding: 0.5rem 0;
  font-size: 0.875rem;
}

.mobile-menu .btn {
  width: 100%;
  margin-top: 0.375rem;
  margin-bottom: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* Car Grid */
.car-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .car-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .car-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.car-card {
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.car-card:hover .car-name {
  color: var(--primary);
}

.car-card:hover .car-image img {
  transform: scale(1.05);
}

.car-image {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  background: var(--muted);
}

.car-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  transition: transform 0.5s;
}

.car-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e5e7eb, #d1d5db);
  color: var(--muted-foreground);
  font-size: 0.875rem;
  text-align: center;
  padding: 1rem;
}

.car-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.car-name {
  font-weight: 500;
  transition: color 0.2s;
}

.car-meta {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.car-price {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.car-price span {
  font-weight: 500;
}

.arrow-icon {
  color: var(--muted-foreground);
  transition: color 0.2s;
}

.car-card:hover .arrow-icon {
  color: var(--primary);
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.375rem;
  padding: 0.75rem 0;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.breadcrumbs a {
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumbs a:hover {
  color: var(--primary);
}

.breadcrumb-sep {
  color: var(--border);
  flex-shrink: 0;
}

.breadcrumbs .current {
  color: var(--foreground);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 20rem;
}

/* Sections */
.section {
  padding: 6rem 0;
}

.section-header {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

@media (min-width: 768px) {
  .section-header {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
}

.section-label {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

@media (min-width: 768px) {
  .section-title {
    font-size: 3rem;
  }
}

/* Badge Filters */
.badge-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.badge-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.2s;
}

.badge-filter:hover {
  color: var(--foreground);
  border-color: var(--foreground);
}

.badge-filter.active {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(16, 185, 129, 0.05);
}

.badge-filter .badge-emoji {
  font-size: 1rem;
  line-height: 1;
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--foreground);
  color: var(--background);
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  transform: translateY(150%);
  transition: transform 0.3s ease;
  z-index: 100;
}

.toast.show {
  transform: translateY(0);
}