.container {
	display: flex;
	margin: 0 auto;
	width: 60%;
	/* 60% width to allow 20% space on each side */
}

.sidebar {
	width: 25%;
	background-color: #ffffff;
	padding: 20px;
	box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
}

.sidebar h3 {
	background-color: #f8e71c;
	padding: 10px;
	margin: 0;
}

.sidebar ul {
	list-style-type: none;
	padding: 0;
	margin: 0;
}

.sidebar ul li {
	margin: 15px 0;
}

.sidebar ul li a {
	text-decoration: none;
	color: #888;
}

.nav>ul>li>a {
	color: black;
}

.sidebar ul li a.active {
	color: #000000;
	font-weight: bold; /* 加粗字体 */
}

.submenu {
	display: none;
	list-style-type: none;
	padding-left: 20px;
	margin-top: 10px;
}

.sidebar .contact {
	margin-top: 30px;
}

.sidebar .contact p {
	margin: 10px 0;
}

.content {
	width: 75%;
	padding: 20px;
}

.product-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	/* 3 columns */
	gap: 20px;
}

.product img {
	max-width: 100%;
	height: auto;
	margin-bottom: 10px;
	transition: transform 0.5s ease, box-shadow 0.5s ease;
	cursor: pointer;
}

.product img:hover {
	transform: scale(1.1) rotate(5deg);
	/* Zoom in and rotate */
	box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
	/* Add shadow */
}

.modal {
	display: none;
	/* Hidden by default */
	position: fixed;
	z-index: 1000;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	overflow: auto;
	background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
	background-color: #000;
	margin: 0 auto;
	padding: 20px;
	/* border: 1px solid #888; */
	width: 60%;
	position: relative;
	cursor: default;
}

.modal-arrow {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -22px;
    color: white;
    font-weight: bold;
    font-size: 30px;
    transition: 0.3s;
    border-radius: 0 3px 3px 0;
    user-select: none; /* 禁止文本选择 */
}

.modal-arrow.left {
    left: 15%;
	top: 40%;
}

.modal-arrow.right {
    right: 15%;
	top: 40%;
}

/* 鼠标悬停在箭头上的效果 */
.modal-arrow:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* 选中的缩略图边框效果 */
.thumbnail-item img.selected {
    border: 2px solid yellow;
}

.close {
	color: #aaa;
	float: right;
	font-size: 28px;
	font-weight: bold;
}

.close:hover,
.close:focus {
	color: yellow;
	text-decoration: none;
	cursor: pointer;
}

.modal-image img {
	width: 100%;
	transition: transform 0.5s ease;
}

.modal-image img.zoomed {
	transform: scale(2);
	cursor: zoom-out;
}

.spec-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	/* Adjust 100px as needed */
	gap: 10px;
	/* Gap between images */
	margin-top: 20px;
}

.spec-image img {
	width: 100%;
	height: auto;
	object-fit: cover;
	border: 1px solid #ddd;
}

.spec-grid1 {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
	/* Adjust 100px as needed */
	gap: 10px;
	/* Gap between images */
	margin-top: 20px;
}

.spec-image1 img {
	width: 100%;
	height: auto;
	object-fit: cover;
	border: 1px solid #ddd;
}

.car-detail-container {
    display: flex;
    gap: 20px;
    /* 将左右部分分配宽度 */
    align-items: stretch; /* 使左右两部分高度一致 */
}

.car-main-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.car-specs {
    flex: 1; /* 使左右部分宽度相等 */
    display: flex;
    flex-direction: column;
    justify-content: center; /* 垂直居中 */
}

.car-specs h2 {
    font-size: 24px; /* 标题的字体大小 */
    margin-bottom: 20px; /* 添加下边距 */
}

.spec-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 两列布局 */
    gap: 10px; /* 网格项之间的间距 */
    font-size: 14px; /* 调整字体大小 */
}

.spec-grid p {
    margin: 0;
    line-height: 1.6;
}


/* 调整整体容器的响应式宽度 */
.car-detail-container img {
    width: 100%; /* 图片部分的宽度 */
    height: auto; /* 保持图片比例 */
    object-fit: contain; /* 保持图片比例 */
}

.car-main-image {
	width: 100%; /* 容器宽度 */
	    max-width: 500px; /* 限制容器的最大宽度 */
	    height: 300px; /* 固定高度 */
	    display: flex;
	    justify-content: center;
	    align-items: center;
	    overflow: hidden; /* 防止图片溢出 */
}

.car-main-image img {
	width: 100%; /* 图片宽度占满容器 */
	    height: 100%; /* 图片高度占满容器 */
	    object-fit: contain; /* 保持图片的原始宽高比，适应容器 */
}

.car-thumbnails {
	display: flex;
	flex-wrap: wrap;
	/* 允许缩略图换行排列 */
	gap: 10px;
	/* 缩略图之间的间距 */
}

.thumbnail-item {
	position: relative;
	display: inline-block;
	margin: 5px;
}

.thumbnail-item img {
	width: 190px;
	/* 根据需要调整缩略图宽度 */
	height: auto;
	object-fit: cover;
	display: block;
	border: 1px solid #ddd;
}

.thumbnail-item p {
	position: absolute;
	bottom: 0;
	/* 将文字固定在图片底部 */
	width: 100%;
	background-color: rgba(0, 0, 0, 0.5);
	/* 半透明背景以确保文字清晰可见 */
	color: white;
	font-size: 12px;
	/* 根据需要调整文字大小 */
	text-align: center;
	margin: 0;
	padding: 5px 0;
	/* 控制文字和图片底部之间的间距 */
}

.thumbnail-item a {
	display: block;
	position: relative;
	text-decoration: none;
	/* 移除默认的下划线 */
}

.thumbnail-item a img {
	width: 100%;
	/* 保持图片填满父容器 */
	height: auto;
}

.thumbnail-item p {
	position: absolute;
	bottom: 0;
	width: 100%;
	background-color: rgba(0, 0, 0, 0.5);
	color: white;
	font-size: 12px;
	text-align: center;
	margin: 0;
	padding: 5px 0;
}

/* 弹框样式 */
.modal {
	display: none;
	/* 默认隐藏 */
	position: fixed;
	z-index: 1000;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.9);
}

.modal-image-container {
	display: flex;
	justify-content: center;
	align-items: center;
	height: 80%;
}

.modal-content {
	max-width: 90%;
	max-height: 80%;
	object-fit: contain;
}

.modal-thumbnails {
	display: flex;
	justify-content: center;
	margin: 10px 0;
	overflow-x: auto;
}

.thumbnail-item {
	margin: 0 5px;
}

.thumbnail-item img {
	width: 100px;
	height: 75px;
	object-fit: cover;
	cursor: pointer;
	border: 2px solid transparent;
}

.thumbnail-item img:hover {
	border-color: yellow;
}

.close {
	position: absolute;
	top: 20px;
	right: 30px;
	color: white;
	font-size: 35px;
	font-weight: bold;
	cursor: pointer;
}