/* styles.css */
html,body {
  font-family: Arial, sans-serif;
  height: 100%;
    margin: 0;
    padding: 0;
  display: flex;
    flex-direction: column;
}

header {
  text-align: center;
  padding: 20px;
  background-color: #f8f8f8;
}

header h1 {
  margin: 0;
}
header p {
  color: #666;
  max-width: 800px;
  margin: 20px auto;
}

.content{
  flex:1;
}

.cars {
  flex:1;
  max-width: 1200px;
  margin: 20px auto;
  padding: 10px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
}

.cars h2 {
  text-align: center;
  width: 100%;
  margin-bottom: 20px;
}

.cars ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
}

.cars ul li {
  flex: 1;
  min-width: 200px;
  max-width: 300px;
  margin: 10px;
  text-align: center;
  background: #fff;
  border-radius: 5px;
  overflow: hidden;
  /* 确保图片不会超出容器 */
  display: flex;
  justify-content: center;
  /* 水平居中图片 */
  align-items: center;
  /* 垂直居中图片 */
}

.cars ul li a {
  text-decoration: none;
  color: #333;
  display: flex;
  flex-direction: column;
  align-items: center;

}

.cars ul li img {
  max-width: 100%;
  height: auto;
  display: block;
  /* 清除图片下方的空白 */
  object-fit: contain;
  /* 保证图片完整显示 */
}
footer {
  text-align: center;
  padding: 10px 20px;
  background-color: #333;
  color: #fff;
}

@media (max-width: 768px) {
  .cars ul {
    flex-direction: column;
    align-items: center;
  }
}