* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: "Segoe UI", sans-serif;
  line-height: 1.6;
}
.header {
  background: #fff;
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  z-index: 1000;
}
.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  height: 90px;
  width: 150px;
  border-radius: 40px;
}

.search-form {
  display: flex;
  gap: 1rem;
  
  width: 100%;
  max-width: 600px; 
}

.search-form input {
  padding: 0.8rem 1rem;
  flex: 1;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
}

.search-form button {
  padding: 0.8rem 1.5rem;
  background-color: #d70000;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.search-form button:hover {
  background-color: #b00000;
}

.user-actions {
  display: flex;
  gap: 15px;
  align-items: center;
}
.user-actions button {
  background-color: red;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  align-items: center;
  gap: 5px;
  font-size: 14px;
}
.user-actions button:hover {
  background-color: #b00000;
}
.custom-header {
  display: flex;
  background-color: red;
  color:#000;
  font-family: Arial, sans-serif;
  margin-bottom: 15px;
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  z-index: 1000;
}

.dropdown {
  position: relative;
  display: inline-block;
  margin-right: 10px;
}

.dropdown-toggle {
  background-color: #000;
  color: #fff;
  padding: 15px 25px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  border-radius: 4px;
  font-size: 18px;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: white;
  width: 300px; 
  border: 1px solid #ccc;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  margin-top: 5px;
  border-radius: 4px;
  overflow: hidden;
  font-size: 16px;
  font-family: Arial, sans-serif;
}

.dropdown-menu.show {
  display: block;
}

.dropdown-menu li {
  list-style-type: none;
}

.dropdown-menu li a {
  display: block;
  padding: 12px 16px;
  color: #333;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.dropdown-menu li a:hover {
  background-color: #f5f5f5;
  color: #d70000;
}

.nav {
  flex-grow: 1;
}

.nav-links {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
  width: 100%;
}

.nav-links li {
  flex: 1;
  text-align: center;
}

.nav-links li a {
  display: block;
  padding: 15px 0;
  color: white;
  text-decoration: none;
  transition: background-color 0.3s;
}

.nav-links li a:hover,
.nav-links li a.active {
  background-color: rgb(140, 33, 33);
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2); 
  transform: translateY(-2px); 
  transition: all 0.3s ease;
}


.categories {
  padding: 3rem 2rem;
  text-align: center;
}
.categories h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
}

.category-grid {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.category-card {
  width: 300px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  overflow: hidden;
  transition: transform 0.3s ease;
}
.category-card:hover {
  transform: translateY(-5px);
}
.category-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.category-card h3 {
  margin: 1rem 0;
}
.btn {
  display: inline-block;
  margin: 1rem 0 2rem;
  padding: 0.6rem 1.2rem;
  background: #d70000;
  color: white;
  text-decoration: none;
  border-radius: 4px;
}
.btn:hover {
  background: #a80000;
}
footer {
  text-align: center;
  background: #f8f8f8;
  padding: 1rem;
  margin-top: 3rem;
}
img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.slideshow-container {
  max-width: 1300px;
  position: relative;
  margin: auto;
  height: 600px; 
  overflow: hidden;
}

.prev,
.next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  padding: 16px;
  margin-top: -22px;
  color: white;
  font-weight: bold;
  font-size: 18px;
  transition: 0.6s ease;
  border-radius: 0 3px 3px 0;
  user-select: none;
  background-color: red;
}
.next {
  right: 0;
  border-radius: 3px 0 0 3px;
}

.prev:hover,
.next:hover {
  background-color: rgb(0, 0, 0, 0.8);
}

.text {
  color: #f2f2f2;
  font-size: 15px;
  padding: 8px 12px;
  position: absolute;
  bottom: 8px;
  width: 100%;
  text-align: center;
}
.dot {
  display: inline-block;
  border-radius: 100%;
  width: 20px;
  height: 20px;
  background-color: #999;
  cursor: pointer;
}
.dot:hover {
  background-color: #555;
}
.dot.active {
  background-color: #555;
}  
  .car-list {
    padding: 3rem 2rem;
    text-align: center;
  }
  
  .car-list h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #d70000;
  }
  
  .car-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
  }
  
  .car-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
  }
  
  .car-card:hover {
    transform: translateY(-5px);
  }
  
  .car-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
  }
  
  .car-card h3 {
    padding: 1rem 1rem 0;
    font-size: 1.2rem;
    color: #222;
  }
  
  .car-card p {
    padding: 0 1rem;
    color: #666;
  }
  
  .car-card a {
    display: inline-block;
    margin: 1rem 0 2rem;
    padding: 0.6rem 1.2rem;
    background: #d70000;
    color: white;
    text-decoration: none;
    border-radius: 4px;
  }
  
  .car-card a:hover {
    color: white;
  }
  
  /* Responsive cho tablet (dưới 1024px) */
@media (max-width: 1024px) {
  .search-form {
    max-width: 100%;
    flex-direction: column;
  }

  .search-form input,
  .search-form button {
    width: 100%;
    margin-top: 0;
  }

  .user-actions {
    flex-direction: column;
    gap: 10px;
  }

  .nav-links {
    flex-direction: column;
  }

  .nav-links li {
    text-align: left;
  }

  .dropdown-toggle {
    padding: 12px 20px;
    font-size: 16px;
  }
}

/* Responsive cho điện thoại (dưới 768px) */
@media (max-width: 768px) {
  .header .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .logo {
    width: 120px;
    height: auto;
  }

  .custom-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .dropdown-toggle {
    width: 100%;
  }

  .dropdown-menu {
    width: 100%;
  }

  .categories {
    padding: 2rem 1rem;
  }

  .category-grid {
    flex-direction: column;
    align-items: center;
  }

  .category-card {
    width: 90%;
  }

  .slideshow-container {
    height: auto;
  }

  .prev,
  .next {
    font-size: 14px;
    padding: 10px;
  }

  .car-grid {
    grid-template-columns: 1fr;
    padding: 0 1rem;
  }

  .car-card {
    width: 100%;
  }

  .text {
    font-size: 12px;
  }

  .dot {
    width: 14px;
    height: 14px;
  }

  .dropdown {
    width: 100%;
  }
}
