/* 全局样式 */
:root {
    --primary-color: #1d4ed8;
    --secondary-color: #3b82f6;
    --accent-color: #60a5fa;
    --text-color: #1f2937;
    --light-text: #6b7280;
    --background-color: #f9fafb;
    --card-background: #ffffff;
}

/* 基础样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    background-color: #071023;
    /* 主背景色，深蓝色 */
    color: #E5E7EB;
    /* 默认文字颜色，浅灰色 */
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.section-title {
    font-size: 1.125rem;
    /* 36px */
    margin-bottom: 0.25rem;
    color: #FFFFFF;
}

.section-subtitle {
    font-size: 0.75rem;
    /* 18px */
    margin-bottom: 0.25rem;
    color: #D1D5DB;
    /* gray-300 */
}

.product-line {
    font-size: 0.8rem;
    margin-bottom: 0.125px;
    color: #D1D5DB;
}

.about-list {
    font-size: 1rem;
}

.cooking-list {
    font-size: 0.9rem;
    margin-bottom: 0.125px;
}

@media (max-width: 375px) {
    .cooking-list {
        font-size: 0.85rem;
        margin-bottom: 0.125px;
    }

    .about-list {
        padding-top: 0.2rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 320px) {
    .product-line {
        font-size: 0.68rem;
    }

    .about-list {
        padding-top: 0.3rem;
        font-size: 0.7rem;
    }

    .cooking-list {
        font-size: 0.75rem;
        margin-bottom: 0.125px;
    }
}

.img-scale-small {
    transform: scale(0.25);
    transition: transform 0.3s ease;
    /* 可选：平滑过渡效果 */
}

.img-scale-large {
    transform: scale(2);
    transition: transform 0.3s ease;
    /* 可选：平滑过渡效果 */
    z-index: 10;
    /* 确保放大的图片在最上层，避免被其他元素遮挡 */
    position: relative;
    /* 配合 z-index 生效 */
}

/* 移动端导航菜单动画 */
#mobileMenu {
    transition: all 0.3s ease-in-out;
    max-height: 0;
    overflow: hidden;
}

#mobileMenu.active {
    max-height: 600px;
}

/* 下拉菜单样式 */
#productSubMenu,
#solutionSubMenu {
    transition: all 0.3s ease-in-out;
    max-height: 0;
    overflow: hidden;
}

#productSubMenu.active,
#solutionSubMenu.active {
    max-height: 300px;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

/* 下拉菜单图标旋转 */
#productMenuToggle svg.rotate,
#solutionMenuToggle svg.rotate {
    transform: rotate(180deg);
}

/* 下拉菜单触发区域 */
#productMenuToggle,
#solutionMenuToggle {
    cursor: pointer;
    user-select: none;
}

/* 下拉菜单项样式 */
#productSubMenu a,
#solutionSubMenu a {
    /* color: var(--light-text); */
    transition: color 0.2s ease;
}

#productSubMenu a:hover,
#solutionSubMenu a:hover {
    color: var(--primary-color);
}

/* 按钮悬停效果 */
.btn-hover-effect {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-hover-effect:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.products-section-bg {
    background-image: url('https://fq-website-1256166192.cos.ap-shanghai.myqcloud.com/assets/home/bg/bg_06.jpg');
    /* 注意路径已调整 */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* 产品卡片悬停效果 */
.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* 响应式调整 */
@media (min-width: 640px) {
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 768px) {
    .grid-cols-1 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .grid-cols-1 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* 表单元素样式 */
input,
textarea {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input:focus,
textarea:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.machine-bg {
    background: url('https://fq-website-1256166192.cos.ap-shanghai.myqcloud.com/assets/product/tdj/bg/bg2_04.jpg') no-repeat center/cover;
    will-change: transform;
    backface-visibility: hidden;
}

/* 性能优化 */
img {
    transform: translateZ(0);
    will-change: transform;
}

.trapezoid-overlay {
    background-color: rgba(255, 255, 255, 0.8);
    /* 半透明白色背景 */
    /* 使用6个点来定义，概念上是左右两个梯形的组合，但视觉上与原4点梯形一致 */
    /* clip-path: polygon(0% 0%, 50% 0%, 60% 0%, 40% 100%, 25% 100%, 0% 100%); */
}