﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: '微软雅黑', sans-serif;
    background-color: #ffffff;
}

.container {
    display: grid; /* 使用 grid 布局 */
    grid-template-columns: 20% 80%; /* 左右列的比例 */
    height: 100vh; /* 设置容器高度为视口高度 */
}

.menu {
    background-color: #f2f2f2;
    border-right: 1px solid #ccc; /* 添加右边框分隔 */
    position: sticky; /* 设置菜单为粘性布局 */
    overflow-y: auto; /* 允许垂直滚动 */  
    height: 100vh; /* 根据需要调整高度 */  
}

.menu ul {
    list-style: none;
    padding: 0;
}

.menu li {
    height: 60px;
    line-height: 60px;
    padding: 0;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.3s, color 0.3s;
    font-size: 14px;
    position: relative;
}

.menu li.active {
    background-color: #ffffff; /* 点击后的背景颜色 */
    color: #000; /* 改变文字颜色 */
}

.menu li.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px; /* 红线宽度 */
    background-color: red; /* 红线颜色 */
}

.menu li:hover {
    background-color: #ffffff; /* 鼠标悬停时的背景色 */
    color: #000; /* 鼠标悬停时文字颜色 */
}

.menu li:hover::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px; /* 红线宽度 */
    background-color: red; /* 红线颜色 */
}

.pro_list {
    padding: 10px;
    display: flex;
    flex-wrap: wrap; /* 自动换行布局 */
    overflow-y: auto;
    height: 100vh;
}

.pro_img_k {
    display: block; /* 使用块级布局 */
    width: calc(50% - 20px); /* 每行两张图片，并考虑间隔 */
    margin: 0 10px 20px 10px; /* 设置底部外边距 */
    float: left; /* 使用浮动来实现两列布局 */
}

.pro_img {
    width: 100%; /* 图片宽度自适应 */
    min-height: 200px; /* 设置统一高度 */
    object-fit: cover; /* 让所有图片填满200px的高度，可能会裁剪 */
    border-radius: 10px; /* 保持圆角效果 */
}

.pro_img img {
    width: 100%; /* 图片填满容器 */
    height: 200px; /* 强制高度为200px */
    object-fit: cover; /* 图片裁剪以填满容器，保持宽高比 */
    border-radius: 10px; /* 圆角效果 */
}

.pro_img_title {
    text-align: center; /* 标题居中 */
    font-size: 14px;
    margin-top: 10px;
}

/*页脚*/
/*页脚*/
.footer {
    position: fixed;
    bottom: 0px;
    left: 0;
    right: 0;
    margin-left: auto;
    margin-right: auto;
    display: flex; /* 使用 flexbox 布局 */
    justify-content: space-between; /* 左右两部分间隔分布 */
    align-items: center; /* 垂直居中 */
    height: 60px;
    background: #fff;
    padding: 10px;
}

.footer_left {
    width: 20%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer_left img {
    width: 100%;
    height: 40px;
}

.footer_right {
    width: 80%;
}

.footer_yuyue {
    width: 100%;
    background: #db0026;
    border-radius: 20px;
    margin: 0 auto;
    color: #fff;
    height: 40px;
    line-height: 40px;
    text-align: center;
    display: block;
}




.pro_img.loading {  
    opacity: 0.5; /* 示例：设置加载中的图片为半透明 */  
    background: url('path/to/loading-icon.gif') center center no-repeat; /* 示例：添加一个加载图标 */  
    background-size: contain;  
}  
  
.pro_img.loaded {  
    opacity: 1; /* 示例：加载完成后恢复不透明度 */  
    background: none; /* 移除加载图标 */  
}  
  
.pro_img.error {  
    opacity: 1; /* 示例：加载失败时保持不透明度 */  
    background: url('path/to/error-icon.png') center center no-repeat; /* 示例：添加一个错误图标 */  
    background-size: contain;  
}
