/* 主容器 - 保持350×300尺寸 */
.focus {
    width: 350px;
    height: 300px;
    overflow: hidden;
    margin-bottom: 20px;
    position: relative;
    border-radius: 10px;
    background: #444; /* 统一背景色 */
}

/* 轮播列表 */
.focus ul {
    position: absolute;
    left: 0;
    top: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    height: 100%;
}

/* 每个轮播项 - 核心：使用flex让图片居中 */
.focus ul li {
    float: left; /* 保持float兼容JS */
    width: 350px;
    height: 300px;
    position: relative;
    background-color: #444;
    /* 使用flex布局 */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 链接容器 - 填充并居中 */
.focus ul li a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

/* 图片样式 - 关键优化 */
.focus img {
    /* 限制最大尺寸，保持比例 */
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    display: block;
    /* 确保图片显示效果 */
    object-fit: contain; /* 完整显示图片，不会被裁剪 */
}

/* 标题样式 - 简洁优化 */
.focus .divtitle {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 40px;
    line-height: 40px;
    color: #fff;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    background-color: rgba(0,0,0,0.6);
    z-index: 2;
    padding: 0 10px;
    box-sizing: border-box;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}