/* 网格布局样式 */
.card-section {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    box-sizing: border-box;
}

/* 卡片布局容器 - 精选软件区域固定显示4列 */
.card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    column-gap: 20px;
    row-gap: 50px;
    padding: 0 24px 24px 24px;
    box-sizing: border-box;
    width: 100%;
    max-width: 1356px; /* 4 * 300px + 3 * 20px gap + 2 * 24px padding */
    margin: 0 auto;
}

/* 网格项目样式 */
.grid-item {
    display: flex;
    box-sizing: border-box;
}

/* 小屏幕适配 */
@media screen and (max-width: 1400px) {
    .card-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media screen and (max-width: 1024px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .card-section {
        padding: 0 16px;
    }
    .card-grid {
        column-gap: 16px;
        row-gap: 40px;
        padding: 16px;
        grid-template-columns: repeat(1, 1fr);
    }
}

/* 可视化布局的占位符样式 */
.grid-placeholder {
    background: #f0f7ff;
    border: 2px dashed #1677ff;
    border-radius: 8px;
    width: 300px;
    height: 370px;
    position: relative;
    box-sizing: border-box;
}

.grid-placeholder::before {
    content: attr(data-index);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    color: #1677ff;
}

/* 换一换按钮样式 */
.featured-change {
    cursor: pointer;
    user-select: none;
}

.featured-change:hover {
    opacity: 0.8;
}

.featured-change:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}