* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  background-color: #f8f9fa;
  line-height: 1.5;
  overflow-x: hidden;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  position: fixed;
  top: 15px;
  right: 15px;
  z-index: 1001;
  width: 40px;
  height: 40px;
  background: #4d78bc;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.mobile-menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: white;
  border-radius: 1px;
  transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Top Header */
.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 60px;
  height: 60px;
  background: #fff;
  border-bottom: 1px solid #ddd;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.logo img {
  width: 200px;
  height: 40px;
  object-fit: contain;
}

.right-info {
  color: #000;
  display: flex;
  align-items: center;
  gap: 12px;
}

.right-info .phone-info {
  font-size: 16px;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 6px;
}

.right-info .divider {
  font-size: 16px;
  font-weight: bold;
  color: #999;
}

.right-info .login-link {
  font-size: 16px;
  text-decoration: none;
  color: #000;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 6px;
}

.right-info i {
  font-size: 14px;
}

.right-info .phone-info:hover {
  color: #4d78bc;
  cursor: pointer;
}

.right-info .login-link:hover {
  color: #4d78bc;
  cursor: pointer;
}

/* Navbar */
.navbar {
  height: 65px;
  background: #4d78bc;
  padding: 0px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: sticky;
  top: 60px;
  z-index: 999;
}

.navbar-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  width: 100%;
  max-width: 1200px;
}

.navbar a {
  color: #fff;
  font-size: 13px;
  font-weight: bold;
  text-decoration: none;
  position: relative;
  white-space: nowrap;
}

.navbar a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -21px;
  width: 0%;
  height: 2px;
  background: #fff;
  transition: width 0.3s ease-in-out;
}

.navbar a:hover::after {
  width: 100%;
}

.new-badge {
  background: red;
  color: #fff;
  font-size: 10px;
  padding: 2px 5px;
  border-radius: 3px;
  position: absolute;
  top: -12px;
  right: -18px;
}

/* Homepage Filters Section */
.homepage-filters {
  background: #f8f9fa;
  padding: 30px 0;
  border-bottom: 1px solid #e8eaed;
}

/* Filter Tabs */
.filter-tabs {
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 0;
  margin-bottom: 40px;
  background: transparent;
  border-radius: 0;
  padding: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  max-width: 90%;
  margin: 0 auto 40px auto;
  border-bottom: 2px solid #e8eaed;
}

.filter-tabs::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  flex: 1;
  min-width: 120px;
  padding: 16px 24px;
  border: none;
  background: transparent;
  color: #666;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 0;
  transition: all 0.3s ease;
  white-space: nowrap;
  position: relative;
  border-bottom: 3px solid transparent;
}

.tab-btn:hover {
  background-color: transparent;
  color: #4d78bc;
}

.tab-btn.active {
  background-color: transparent;
  color: #4d78bc;
  box-shadow: none;
  border-bottom: 3px solid #4d78bc;
  font-weight: 600;
}

/* Carousel Container */
.carousel-container {
  position: relative;
  overflow: hidden;
  border-radius: 0;
  width: 90%;
  margin: 0 auto;
  background: transparent;
}

.carousel {
  overflow: hidden;
}

.carousel-track {
  display: flex;
  gap: 15px;
  padding: 30px 0px;
  transition: transform 0.3s ease;
  cursor: grab;
  user-select: none;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-track:active {
  cursor: grabbing;
}

/* Filter Items */
.filter-item {
  flex: 0 0 auto;
  min-width: 150px;
  height: 130px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 20px 15px;
  text-align: center;
  border: 1px solid #f1f3f4;
  position: relative;
}

.number-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background-color: #4d78bc;
  color: white;
  font-size: 12px;
  font-weight: 600;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.filter-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(77, 120, 188, 0.15);
  border-color: #4d78bc;
}

.filter-item.selected {
  border-color: #4d78bc;
  background-color: rgba(77, 120, 188, 0.05);
}

.filter-item.selected .number-badge {
  background-color: #4d78bc;
}

.filter-item .icon {
  font-size: 28px;
  opacity: 0.7;
  transition: all 0.3s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
  border-radius: 8px;
}

.filter-item:hover .icon {
  opacity: 1;
  transform: scale(1.05);
  background: rgba(77, 120, 188, 0.1);
}

.filter-item span {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Main Container for Car Listings */
.main-container {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
  gap: 0;
  position: relative;
}

/* Left Sidebar */
.left-sidebar {
  background: #ffffff;
  border-right: 1px solid #e8eaed;
  position: static;
  padding: 24px 20px;
  width: 280px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  overflow: visible;
}

.filters-container {
  padding-right: 4px;
  margin-right: -4px;
}

.sidebar-header h2 {
  font-size: 15px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 20px;
  letter-spacing: 0.3px;
}

.sidebar-tabs {
  display: flex;
  margin-bottom: 24px;
  border-radius: 8px;
  overflow: hidden;
  background: #f8f9fa;
  border: 1px solid #e8eaed;
}

.sidebar-tab-btn {
  flex: 1;
  padding: 12px 16px;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.5px;
}

.sidebar-tab-btn.active {
  background: #4d78bc;
  color: white;
  box-shadow: 0 2px 4px rgba(77, 120, 188, 0.3);
}

.sidebar-tab-btn:not(.active) {
  color: #5f6368;
}

.sidebar-tab-btn:not(.active):hover {
  background: #f1f3f4;
  color: #1a1a1a;
}

.sidebar-tab-content {
  display: none;
}

.sidebar-tab-content.active {
  display: block;
}

/* Search Tab */
.search-container {
  text-align: center;
}

.search-logo {
  font-size: 28px;
  font-weight: 800;
  color: #4d78bc;
  margin-bottom: 24px;
  letter-spacing: -0.5px;
}

.search-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.search-input {
  padding: 12px 16px;
  border: 2px solid #e8eaed;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.2s ease;
}

.search-input:focus {
  outline: none;
  border-color: #4d78bc;
  box-shadow: 0 0 0 3px rgba(77, 120, 188, 0.1);
}

.search-btn {
  padding: 12px 24px;
  background: #4d78bc;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.5px;
}

.search-btn:hover {
  background: #3d5f9a;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(77, 120, 188, 0.3);
}

/* Filter Sections */
.filter-section {
  border-bottom: 1px solid #f1f3f4;
  margin-bottom: 2px;
}

.filter-section summary {
  padding: 16px 0;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #1a1a1a;
  transition: all 0.2s ease;
}

.filter-section summary:hover {
  color: #4d78bc;
}

.filter-section[open] summary .arrow {
  transform: rotate(180deg);
}

.arrow {
  transition: transform 0.2s ease;
  font-size: 12px;
  color: #5f6368;
}

.filter-content {
  padding: 0 0 20px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.filter-content label {
  display: flex;
  align-items: center;
  font-size: 13px;
  color: #5f6368;
  cursor: pointer;
  transition: color 0.2s ease;
}

.filter-content label:hover {
  color: #1a1a1a;
}

.filter-content input[type="checkbox"] {
  margin-right: 12px;
  accent-color: #4d78bc;
  width: 16px;
  height: 16px;
}

.slider {
  width: 100%;
  height: 6px;
  background: #e8eaed;
  border-radius: 3px;
  outline: none;
  margin: 12px 0;
  accent-color: #4d78bc;
  cursor: pointer;
}

.range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #5f6368;
  font-weight: 500;
}

.price-inputs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.price-input {
  flex: 1;
  padding: 8px 12px;
  border: 2px solid #e8eaed;
  border-radius: 6px;
  font-size: 12px;
  transition: border-color 0.2s ease;
  min-width: 0;
}

.price-input:focus {
  outline: none;
  border-color: #4d78bc;
  box-shadow: 0 0 0 2px rgba(77, 120, 188, 0.1);
}

/* Main Content */
.main-content {
  padding: 32px;
  background: #f8f9fa;
  min-height: calc(100vh - 125px);
  position: relative;
}

.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e8eaed;
}

.content-header h1 {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
}

.sort-btn {
  padding: 10px 20px;
  background: #4d78bc;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.5px;
}

.sort-btn:hover {
  background: #3d5f9a;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Car Grid - 3 columns */
.car-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
  position: relative;
}

.car-grid::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  pointer-events: none;
  z-index: -1;
}

.first-row-end-marker {
  position: absolute;
  top: 300px;
  left: 0;
  width: 100%;
  height: 1px;
  pointer-events: none;
  z-index: -1;
}

.car-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 1px solid #f1f3f4;
}

.car-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  border-color: #e8eaed;
}

.car-image {
  position: relative;
  height: 160px;
  overflow: hidden;
}

.car-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-overlay {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.photo-count,
.video-icon {
  background: rgba(0, 0, 0, 0.75);
  color: white;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  backdrop-filter: blur(4px);
}

.status-label {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.just-sold {
  background: #fbbc04;
  color: #7c4a00;
}
.just-arrived {
  background: #ea4335;
  color: white;
}
.luxury-pick {
  background: #4d78bc;
  color: white;
}
.electric-pick {
  background: #34a853;
  color: white;
}
.performance-pick {
  background: #ea4335;
  color: white;
}
.executive-choice {
  background: #4d78bc;
  color: white;
}
.premium-suv {
  background: #34a853;
  color: white;
}
.supercar {
  background: #fbbc04;
  color: #7c4a00;
}
.hypercar {
  background: #ea4335;
  color: white;
}
.luxury-suv {
  background: #4d78bc;
  color: white;
}
.mid-size-suv {
  background: #4d78bc;
  color: white;
}
.hybrid-suv {
  background: #34a853;
  color: white;
}
.sports-car {
  background: #ea4335;
  color: white;
}
.luxury-sedan {
  background: #4d78bc;
  color: white;
}
.electric-truck {
  background: #34a853;
  color: white;
}
.exotic {
  background: #fbbc04;
  color: #7c4a00;
}

.car-details {
  padding: 20px;
}

.car-details h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
  color: #1a1a1a;
  line-height: 1.3;
}

.car-model {
  font-size: 13px;
  color: #5f6368;
  margin-bottom: 12px;
  font-weight: 500;
}

.car-price {
  font-size: 18px;
  font-weight: 800;
  color: #1a1a1a;
  margin-bottom: 10px;
}

.car-info {
  font-size: 12px;
  color: #5f6368;
  margin-bottom: 8px;
  font-weight: 500;
}

.fuel-economy {
  font-size: 12px;
  color: #4d78bc;
  font-weight: 600;
  margin-bottom: 20px;
}

.card-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.primary-btn {
  padding: 12px 20px;
  background: #4d78bc;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.3px;
}

.primary-btn:hover {
  background: #3d5f9a;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(77, 120, 188, 0.3);
}

.secondary-btn {
  color: #4d78bc;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  transition: all 0.2s ease;
}

.secondary-btn:hover {
  text-decoration: underline;
  color: #3d5f9a;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid #f1f3f4;
}

.card-footer a {
  color: #5f6368;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.card-footer a:hover {
  color: #4d78bc;
  transform: translateY(-1px);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 40px;
}

.page-numbers {
  display: flex;
  gap: 8px;
}

.page-btn {
  padding: 10px 18px;
  border: 2px solid #e8eaed;
  background: white;
  color: #5f6368;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.page-btn:hover:not(:disabled) {
  background: #f1f3f4;
  border-color: #4d78bc;
  color: #4d78bc;
  transform: translateY(-1px);
}

.page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.page-btn.current {
  background: #4d78bc;
  color: white;
  border-color: #4d78bc;
  box-shadow: 0 2px 4px rgba(77, 120, 188, 0.3);
}

/* Footer Styles - Fixed background image issue */
.footer {
  position: relative;
  background: rgba(0, 0, 0, 0.9);
  color: white;
  overflow: hidden;
  margin-top: 0; /* Fixed: Remove margin-top to prevent background showing above */
}

/* Fixed Background Image - Contained within footer */
.footer::before {
  content: "";
  position: absolute; /* Changed from fixed to absolute */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("https://images.pexels.com/photos/3802510/pexels-photo-3802510.jpeg?auto=compress&cs=tinysrgb&w=1920&h=1080&fit=crop");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.3;
  z-index: -1;
}

/* Social Icons Section */
.social-section {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 10;
}

.social-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
}

.social-icons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.social-icon {
  display: flex;
  align-items: center;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.05);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  text-decoration: none;
  color: white;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  position: relative;
}

.social-icon:last-child {
  border-right: none;
}

.social-icon svg {
  width: 20px;
  height: 20px;
  margin-right: 8px;
  fill: currentColor;
}

/* Social Media Hover Colors */
.social-icon.facebook:hover {
  background-color: #1877f2;
  color: white;
}

.social-icon.twitter:hover {
  background-color: #000000;
  color: white;
}

.social-icon.dribbble:hover {
  background-color: #ea4c89;
  color: white;
}

.social-icon.pinterest:hover {
  background-color: #bd081c;
  color: white;
}

.social-icon.linkedin:hover {
  background-color: #0a66c2;
  color: white;
}

.social-icon.whatsapp:hover {
  background-color: #25d366;
  color: white;
}

/* Main Footer Content */
.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px;
  position: relative;
  z-index: 10;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
}

.footer-column h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 24px;
  color: white;
  letter-spacing: 1px;
}

/* Company Info Column */
.company-info p {
  color: #ccc;
  margin-bottom: 24px;
  line-height: 1.7;
}

.contact-info {
  list-style: none;
}

.contact-info li {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  color: #ccc;
}

.contact-info svg {
  width: 18px;
  height: 18px;
  margin-right: 12px;
  fill: #4a90e2;
  flex-shrink: 0;
}

/* Useful Links */
.useful-links ul {
  list-style: none;
}

.useful-links li {
  margin-bottom: 12px;
}

.useful-links a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
}

.useful-links a:hover {
  color: #4a90e2;
}

.useful-links a::before {
  content: "▸";
  margin-right: 8px;
  color: #4a90e2;
}

/* Recent Posts */
.recent-posts .post-item {
  display: flex;
  margin-bottom: 20px;
  gap: 12px;
}

.post-image {
  width: 60px;
  height: 45px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.post-content h4 {
  color: white;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  cursor: pointer;
  transition: color 0.3s ease;
}

.post-content h4:hover {
  color: #4a90e2;
}

.post-date {
  display: flex;
  align-items: center;
  color: #999;
  font-size: 12px;
}

.post-date svg {
  width: 12px;
  height: 12px;
  margin-right: 4px;
  fill: currentColor;
}

/* Newsletter */
.newsletter p {
  color: #ccc;
  margin-bottom: 24px;
  line-height: 1.7;
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.newsletter-input {
  padding: 12px 16px;
  background: transparent;
  border: 1px solid #555;
  border-radius: 4px;
  color: white;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.newsletter-input:focus {
  outline: none;
  border-color: #4a90e2;
}

.newsletter-input::placeholder {
  color: #999;
}

.newsletter-btn {
  padding: 12px 24px;
  background: #4a90e2;
  color: white;
  border: none;
  border-radius: 4px;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.newsletter-btn:hover {
  background: #357abd;
}

/* Footer Bottom */
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 10;
}

.footer-bottom-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.copyright {
  color: #999;
  font-size: 14px;
}

.footer-links {
  display: flex;
  gap: 24px;
  margin-top: 12px;
}

.footer-links a {
  color: #999;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: white;
}

/* Drag and Drop Enhancements */
.carousel-track.dragging {
  cursor: grabbing;
  transition: none;
}

.carousel-track.dragging .filter-item {
  pointer-events: none;
}

/* Animation Classes */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.carousel {
  animation: fadeIn 0.4s ease;
}

.filter-item {
  animation: fadeIn 0.3s ease;
}

.filter-item:nth-child(1) {
  animation-delay: 0ms;
}
.filter-item:nth-child(2) {
  animation-delay: 50ms;
}
.filter-item:nth-child(3) {
  animation-delay: 100ms;
}
.filter-item:nth-child(4) {
  animation-delay: 150ms;
}
.filter-item:nth-child(5) {
  animation-delay: 200ms;
}
.filter-item:nth-child(6) {
  animation-delay: 250ms;
}
.filter-item:nth-child(7) {
  animation-delay: 300ms;
}
.filter-item:nth-child(8) {
  animation-delay: 350ms;
}

/* Focus States for Accessibility */
.tab-btn:focus,
.filter-item:focus {
  outline: 2px solid #4d78bc;
  outline-offset: 2px;
}

.tab-btn:focus:not(:focus-visible),
.filter-item:focus:not(:focus-visible) {
  outline: none;
}

/* Mobile Responsive Styles */
@media (max-width: 1200px) {
  .main-container {
    grid-template-columns: 260px 1fr;
  }

  .left-sidebar {
    width: 260px;
  }

  .car-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 992px) {
  .main-container {
    grid-template-columns: 240px 1fr;
  }

  .left-sidebar {
    width: 240px;
  }

  .car-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-content {
    padding: 40px 20px;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
}

@media (max-width: 768px) {
  /* Mobile menu toggle */
  .mobile-menu-toggle {
    display: flex;
  }

  /* Top header mobile */
  .top-header {
    padding: 0 15px;
    height: 50px;
  }

  .logo img {
    width: 150px;
    height: 30px;
  }

  .right-info {
    gap: 8px;
  }

  .right-info .phone-number,
  .right-info .login-text {
    display: none;
  }

  .right-info .phone-info,
  .right-info .login-link {
    font-size: 14px;
  }

  /* Navbar mobile */
  .navbar {
    position: fixed;
    top: 50px;
    right: -100%;
    width: 280px;
    height: calc(100vh - 50px);
    background: #4d78bc;
    transition: right 0.3s ease;
    z-index: 1000;
    flex-direction: column;
    align-items: flex-start;
    padding: 30px 20px;
    box-shadow: -4px 0 16px rgba(0,0,0,0.15);
  }

  .navbar.active {
    right: 0;
  }

  .navbar-container {
    flex-direction: column;
    gap: 20px;
    width: 100%;
    align-items: flex-start;
  }

  .navbar a {
    font-size: 16px;
    padding: 12px 0;
    width: 100%;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }

  .navbar a::after {
    display: none;
  }

  /* Main container mobile */
  .main-container {
    grid-template-columns: 1fr;
    margin-top: 115px; /* Account for fixed header */
  }

  .left-sidebar {
    position: fixed;
    top: 115px;
    left: -280px;
    width: 280px;
    max-height: calc(100vh - 115px);
    overflow-y: auto;
    z-index: 1000;
    transition: left 0.3s ease;
    background: white;
    box-shadow: 4px 0 16px rgba(0, 0, 0, 0.15);
  }

  .left-sidebar.active {
    left: 0;
  }

  .main-content {
    padding: 20px 15px;
    margin-top: 0;
  }

  .car-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .content-header {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }

  .content-header h1 {
    font-size: 16px;
  }

  /* Filter tabs mobile */
  .filter-tabs {
    margin-bottom: 20px;
    padding: 0;
    max-width: 95%;
  }

  .tab-btn {
    min-width: 100px;
    padding: 12px 15px;
    font-size: 13px;
  }

  /* Filter items mobile */
  .filter-item {
    min-width: 130px;
    height: 110px;
    padding: 15px 10px;
  }

  .filter-item .icon {
    font-size: 24px;
    width: 35px;
    height: 35px;
  }

  .filter-item span {
    font-size: 13px;
  }

  .carousel-track {
    gap: 12px;
    padding: 20px 0;
  }

  /* Car cards mobile */
  .car-card {
    border-radius: 8px;
  }

  .car-image {
    height: 140px;
  }

  .car-details {
    padding: 15px;
  }

  .car-details h3 {
    font-size: 15px;
  }

  .car-price {
    font-size: 16px;
  }

  /* Footer mobile */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .footer-bottom-content {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }

  .footer-links {
    margin-top: 0;
  }

  /* Social icons mobile */
  .social-icons {
    flex-wrap: wrap;
  }

  .social-icon {
    flex: 1 1 50%;
    justify-content: center;
    padding: 10px 16px;
    font-size: 12px;
  }
}

@media (max-width: 576px) {
  /* Extra small mobile */
  .top-header {
    padding: 0 10px;
    height: 45px;
  }

  .logo img {
    width: 120px;
    height: 25px;
  }

  .main-container {
    margin-top: 110px;
  }

  .left-sidebar {
    top: 110px;
    max-height: calc(100vh - 110px);
  }

  .navbar {
    top: 45px;
    height: calc(100vh - 45px);
  }

  .main-content {
    padding: 15px 10px;
  }

  .car-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .content-header h1 {
    font-size: 14px;
  }

  /* Filter tabs extra small */
  .filter-tabs {
    max-width: 100%;
  }

  .tab-btn {
    min-width: 80px;
    padding: 10px 12px;
    font-size: 12px;
  }

  .filter-item {
    min-width: 110px;
    height: 90px;
    padding: 10px 8px;
  }

  .filter-item .icon {
    font-size: 20px;
    width: 30px;
    height: 30px;
  }

  .filter-item span {
    font-size: 12px;
  }

  /* Car cards extra small */
  .car-image {
    height: 120px;
  }

  .car-details {
    padding: 12px;
  }

  .car-details h3 {
    font-size: 14px;
  }

  .car-price {
    font-size: 15px;
  }

  .primary-btn {
    padding: 10px 16px;
    font-size: 12px;
  }

  /* Pagination mobile */
  .pagination {
    flex-wrap: wrap;
    gap: 8px;
  }

  .page-btn {
    padding: 8px 14px;
    font-size: 13px;
  }

  /* Social icons extra small */
  .social-icon {
    flex: 1 1 100%;
    font-size: 11px;
    padding: 8px 12px;
  }

  .social-icon svg {
    width: 16px;
    height: 16px;
  }

  .footer-content {
    padding: 30px 15px;
  }
}

/* Landscape mobile orientation */
@media (max-width: 768px) and (orientation: landscape) {
  .navbar {
    height: calc(100vh - 50px);
  }
  
  .left-sidebar {
    max-height: calc(100vh - 50px);
  }
}

/* Utility classes for JavaScript interactions */
.mobile-sidebar-open {
  overflow: hidden;
}

.mobile-sidebar-open .left-sidebar {
  left: 0 !important;
}

.mobile-navbar-open {
  overflow: hidden;
}

.mobile-navbar-open .navbar {
  right: 0 !important;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}