* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", sans-serif;
}

body {
    background-color: #f5f5f5;
}

.container {
    max-width: 750px;
    margin: 0 auto;
    background-color: white;
}

/* 顶部轮播图 */
.slider-container {
    width: 100%;
    max-width: 750px; /* 最大宽度750px */
    position: relative;
    overflow: hidden;
    margin: 0 auto; /* 居中显示 */
    aspect-ratio: 750 / 200; /* 使用宽高比例 */
}

.slider {
    width: 100%;
    height: 100%;
    position: relative;
}

.slide {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background-size: contain; /* 保持图片原始比例 */
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    background-color: #f5f5f5;
}

/* 媒体查询，适配不同设备 */
@media screen and (max-width: 750px) {
    .slider-container {
        aspect-ratio: 750 / 200; /* 保持宽高比 */
    }
    
    .slide {
        background-size: cover; /* 在小屏幕上使用cover可能更好 */
    }
}

@media screen and (max-width: 480px) {
    .slider-container {
        aspect-ratio: 750 / 200; /* 保持宽高比 */
    }
}

/* 轮播图背景图片通过JavaScript动态设置 */

.slide.active {
    opacity: 1;
}

.slider-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.5);
    margin: 0 5px;
    cursor: pointer;
}

.dot.active {
    background-color: white;
}

/* 主内容区域 */
.main-content {
    display: flex;
    width: 100%;
}

/* 左侧菜单 */
.sidebar {
    width: 30%;
    padding: 5px;
}

.menu-item {
    height: 80px;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 3px;
    transition: background-color 0.3s;
}

.menu-item.active {
    background-color: #b3e5fc;
}

.menu-item:not(.active) {
    background-color: #e1f5fe;
}

/* 右侧产品区域 */
.product-area {
    width: 70%;
    padding: 5px;
}

.product-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 15px;
}

.product-card {
    width: 48%;
    margin-bottom: 15px;
    background-color: white;
    text-align: center;
}

.product-image-container {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    background-color: #e0f7fa;
}

.product-image {
    width: 100%;
    height: 0;
    padding-bottom: 100%; /* 正方形图片 */
    position: relative;
    background-size: cover;
    background-position: center;
}

/* 为每个产品设置不同的背景图片 */
/* 移除了特定产品的背景图片，改为通过JavaScript动态设置 */

.product-info {
    padding: 5px 0;
}

.product-title {
    text-align: center;
    font-size: 14px;
    font-weight: normal;
    line-height: 1.4;
    margin-bottom: 5px;
    color: #333;
}

.product-price {
    text-align: center;
    color: #e53935;
    font-size: 18px;
    font-weight: bold;
}

/* 底部间距 */
.footer-space {
    height: 50px;
}