/* 最好的DEKAI机器标题 */

.best-machines {
    padding: 2rem 0;
    background-color: #eeeeee;
}
.section-title {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 40px;
    text-align: left;
    color: #333;
}
.section-title .highlight {
    color: #007acc;
}
/* 缝纫机网格布局 */

.machines-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 40px;
    margin-bottom: 50px;
}
.machine-item {
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}
.machine-item:hover {
    transform: translateY(-5px);
}
/* 机器图片容器 */

.machine-image {
    position: relative;
    height: auto;
    overflow: hidden;
    background-color: #ffffff;
}
.machine-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.machine-item:hover .machine-image img {
    transform: scale(1.05);
}
/* 悬浮覆盖层 */

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}
.product-badge {
    position: absolute;
    bottom: 0px;
    left: 0px;
    background-color: #008ed6;
    color: white;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    border-top-right-radius: 4px;
}
.machine-item:hover .product-badge {
    background-color: #008ed6;
    color: #fff;
    border-top-right-radius: 10px;
    /* transform: scale(1.1); */
}
.machine-item:hover .machine-overlay .arrow-icon {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.3);
}
/* 机器信息 */

.machine-info {
    padding: 10px 10px 10px 0px;
    text-align: left;
}
.machine-info h3 {
    font-size: 16px;
    color: #333;
    margin: 0;
}
.machine-info a {
    color: #333;
    text-decoration: none;
}
/* 查看全部按钮 */

.view-all-section {
    text-align: left;
    margin-top: 40px;
}
.view-all-btn {
    background: #007acc;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.view-all-btn:hover {
    background: #005a9e;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 122, 204, 0.3);
}
.view-all-btn .arrow-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}
.view-all-btn:hover .arrow-icon {
    transform: translateX(3px);
}
/* 响应式设计 */

@media (max-width: 1024px) {
    .machines-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
    .section-title {
        font-size: 2.2rem;
    }
}
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    .best-machines {
        padding: 40px 0;
    }
    .machines-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        margin-bottom: 40px;
    }
    .section-title {
        font-size: 2rem;
        text-align: center;
        margin-bottom: 40px;
    }
    .machine-image {
        height: auto;
    }
    .machine-info {
        padding: 15px;
    }
    .machine-info h3 {
        font-size: 1.1rem;
    }
    .machine-overlay .arrow-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    .view-all-section {
        text-align: center;
    }
}
@media (max-width: 480px) {
    .machines-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        margin-bottom: 30px;
    }
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }
    .machine-image {
        height: auto;
    }
    .machine-info {
        padding: 12px 0px 0px 0px;
        font-size: 14px;
    }
    .machine-info h3 {
        font-size: 14px;
    }
    .best-machines {
        padding: 30px 0;
    }
    .view-all-btn {
        padding: 10px 25px;
        font-size: 0.9rem;
    }
}
/* 额外的视觉效果 */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.machine-item {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}
.machine-item:nth-child(1) {
    animation-delay: 0.1s;
}
.machine-item:nth-child(2) {
    animation-delay: 0.2s;
}
.machine-item:nth-child(3) {
    animation-delay: 0.3s;
}
.machine-item:nth-child(4) {
    animation-delay: 0.4s;
}
.machine-item:nth-child(5) {
    animation-delay: 0.5s;
}
.machine-item:nth-child(6) {
    animation-delay: 0.6s;
}
.machine-item:nth-child(7) {
    animation-delay: 0.7s;
}
.machine-item:nth-child(8) {
    animation-delay: 0.8s;
}
.view-all-btn {
    animation: fadeInUp 0.6s ease forwards;
    animation-delay: 1s;
    opacity: 0;
}
/* 当页面加载完成后显示动画 */

body.loaded .machine-item, body.loaded .view-all-btn {
    opacity: 1;
}
/* 标题动画 */

.section-title {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}
body.loaded .section-title {
    opacity: 1;
}