/*
Theme Name: ChinaFans Machinery Elite Full Edition
Description: 橙色工业风 | 图标背景融合 | 响应式8格布局 | 询价弹窗集成
Version: 22.0
*/

/* --- 基础重置 --- */
* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; 
}
html { scroll-behavior: smooth; }
body { background: #fff; color: #333; line-height: 1.6; overflow-x: hidden; }

/* --- 第一屏：Hero Banner (响应式优化) --- */
.hero-wrapper { 
    height: 100vh; 
    position: relative; 
    overflow: hidden; 
    display: flex; 
    align-items: center; 
    padding: 0 8%; 
}
.hero-bg { 
    position: absolute; 
    top: 0; left: 0; width: 100%; height: 100%; 
    background: #000 center/cover no-repeat; 
    z-index: 1; 
}
.hero-overlay { 
    position: absolute; 
    top: 0; left: 0; width: 100%; height: 100%; 
    background: linear-gradient(90deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.1) 100%); 
    z-index: 2; 
}
.hero-tag-top { 
    position: absolute; 
    top: 40px; right: 40px; 
    z-index: 10; 
    background: #FF9800; color: #000; 
    padding: 10px 20px; font-weight: 900; letter-spacing: 2px; font-size: 12px;
}
.hero-content { position: relative; z-index: 5; max-width: 800px; color: #fff; }
.hero-content h1 { font-size: 4.5rem; line-height: 1.1; margin-bottom: 25px; text-transform: uppercase; font-weight: 800; }
.hero-content h1 span { color: #FF9800; font-size: 1.4rem; display: block; letter-spacing: 5px; margin-bottom: 10px; }
.hero-content p { font-size: 1.2rem; color: rgba(255,255,255,0.8); margin-bottom: 40px; border-left: 4px solid #FF9800; padding-left: 20px; max-width: 600px; }
.hero-btn { display: inline-block; padding: 18px 50px; background: #FF9800; color: #000; text-decoration: none; font-weight: bold; transition: 0.3s; text-transform: uppercase; }
.hero-btn:hover { background: #fff; transform: translateY(-5px); }

/* --- 第二屏：分类卡片 (带 z1-z4 圆形背景融合) --- */
.biz-menu { background: #f4f7f9; padding: 100px 5%; }
.biz-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; max-width: 1400px; margin: 0 auto; }
.biz-card { 
    background: #fff; border-radius: 4px; padding: 40px 30px; 
    border-bottom: 4px solid #FF9800; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.05); transition: 0.4s;
    position: relative; overflow: hidden;
}
.biz-card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0,0,0,0.1); }

/* 图标圆形背景融合效果 */
.biz-icon-bg {
    position: absolute; top: -10px; right: -10px;
    width: 110px; height: 110px;
    opacity: 0.12; filter: grayscale(100%);
    transition: 0.5s ease; z-index: 1;
}
.biz-icon-bg img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.biz-card:hover .biz-icon-bg { opacity: 0.7; filter: grayscale(0%); transform: scale(1.1) rotate(10deg); }

.biz-card h2 { font-size: 20px; color: #111; font-weight: 800; text-transform: uppercase; margin-bottom: 25px; position: relative; z-index: 2; }
.biz-card ul { list-style: none; position: relative; z-index: 2; }
.biz-card li { margin-bottom: 12px; }
.biz-card a { color: #555; text-decoration: none; font-size: 15px; display: flex; align-items: center; transition: 0.2s; }
.biz-card a:before { content: "→"; margin-right: 12px; color: #FF9800; font-weight: bold; }
.biz-card a:hover { color: #FF9800; padding-left: 8px; }

/* --- 第三屏：Product Samples (8格排列 + 贴边图) --- */
.product-section { padding: 100px 5%; background: #fff; }
.cat-header { max-width: 1400px; margin: 0 auto 50px; border-left: 6px solid #FF9800; padding-left: 20px; }
.cat-header h2 { font-size: 32px; text-transform: uppercase; color: #111; font-weight: 800; line-height: 1.2; }
.cat-header p { font-size: 14px; color: #888; text-transform: uppercase; letter-spacing: 2px; margin-top: 5px; }

.p-grid { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 25px; 
    max-width: 1400px; 
    margin: 0 auto 80px; 
}
.p-card { 
    border: 1px solid #eee; 
    background: #fff; 
    transition: 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex; flex-direction: column;
}
.p-card:hover { border-color: #FF9800; box-shadow: 0 15px 35px rgba(0,0,0,0.1); transform: translateY(-8px); }

/* 图片贴边设计 */
.p-img-box { width: 100%; height: 240px; overflow: hidden; background: #f4f4f4; }
.p-img-box img { width: 100%; height: 100%; object-fit: cover; transition: 0.8s; }
.p-card:hover .p-img-box img { transform: scale(1.1); }

.p-info { padding: 25px; text-align: left; }
.p-info h3 { font-size: 16px; color: #111; font-weight: 700; height: 44px; overflow: hidden; margin-bottom: 20px; line-height: 1.4; }

/* 线条镂空按钮 */
.inq-btn { 
    width: 100%; border: 1.5px solid #111; background: transparent; color: #111; 
    padding: 12px; cursor: pointer; font-weight: bold; text-transform: uppercase;
    font-size: 12px; letter-spacing: 1px; transition: 0.3s;
}
.p-card:hover .inq-btn { background: #FF9800; border-color: #FF9800; color: #000; }

/* --- 询价弹窗样式 --- */
.modal-overlay {
    display: none; position: fixed; z-index: 9999;
    left: 0; top: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85); align-items: center; justify-content: center;
}
.modal-content {
    background: #fff; width: 90%; max-width: 500px;
    padding: 40px; position: relative; border-top: 6px solid #FF9800;
}
.close-modal {
    position: absolute; top: 15px; right: 20px;
    font-size: 32px; cursor: pointer; color: #888; line-height: 1;
}
.modal-header h3 { font-size: 22px; margin-bottom: 8px; text-transform: uppercase; color: #111; }
.modal-header p { font-size: 14px; color: #666; margin-bottom: 25px; }

/* CF7 表单字段优化 */
.wpcf7-form input[type="text"], .wpcf7-form input[type="email"], .wpcf7-form textarea {
    width: 100%; padding: 12px; margin-bottom: 15px; border: 1px solid #ddd; outline: none; font-size: 14px;
}
.wpcf7-form input:focus, .wpcf7-form textarea:focus { border-color: #FF9800; }
.wpcf7-submit {
    width: 100%; background: #111; color: #fff; border: none; padding: 15px;
    font-weight: bold; cursor: pointer; text-transform: uppercase; transition: 0.3s;
}
.wpcf7-submit:hover { background: #FF9800; color: #000; }

/* --- 📱 响应式修复 (手机端适配) --- */
@media (max-width: 1024px) {
    .biz-grid { grid-template-columns: repeat(2, 1fr); }
    .p-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-content h1 { font-size: 3.5rem; }
}

@media (max-width: 768px) {
    .hero-wrapper { padding: 0 5%; }
    .hero-content h1 { font-size: 2.8rem; }
    .hero-tag-top { top: 20px; right: 20px; font-size: 10px; }
    
    .biz-grid { grid-template-columns: 1fr; }
    .p-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    .p-img-box { height: 180px; }
    .p-info { padding: 15px; }
    .p-info h3 { font-size: 14px; height: 40px; }
    .cat-header h2 { font-size: 24px; }
}

@media (max-width: 480px) {
    .p-grid { grid-template-columns: 1fr; } /* 极窄屏显示单列 */
    .p-img-box { height: 260px; }
    .hero-content h1 { font-size: 2.2rem; }
    .modal-content { padding: 30px 20px; }
}
/* --- 重塑 Inquiry 表单样式 (对标图1) --- */

/* 1. 消除 CF7 默认段落产生的多余间距 */
.wpcf7-form p { margin-bottom: 0 !important; }

.inquiry-form-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px; /* 控制输入框之间的间距 */
}

/* 2. 统一输入框样式 */
.inquiry-form-wrapper input[type="text"],
.inquiry-form-wrapper input[type="email"],
.inquiry-form-wrapper textarea {
    width: 100% !important;
    padding: 12px 15px !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 2px !important;
    font-size: 14px !important;
    background: #fff !important;
    outline: none !important;
    transition: 0.3s;
}

/* 3. 只读字段样式（产品名称自动填充项） */
.inquiry-form-wrapper input#product-name {
    background: #f8f9fa !important;
    color: #555 !important;
    border-left: 3px solid #FF9800 !important; /* 增加品牌色引导 */
    cursor: not-allowed;
}

/* 4. 按钮样式 (黑底白字，对标图1) */
.inquiry-form-wrapper .submit-wrap {
    margin-top: 10px;
}

.wpcf7-submit {
    width: 100% !important;
    background: #111 !important;
    color: #fff !important;
    border: none !important;
    padding: 16px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    cursor: pointer !important;
    transition: 0.3s !important;
}

.wpcf7-submit:hover {
    background: #FF9800 !important;
    color: #000 !important;
}

/* 5. 错误提示美化 */
span.wpcf7-not-valid-tip {
    font-size: 12px;
    color: #ff4d4f;
    margin-top: -8px;
    margin-bottom: 10px;
    display: block;
}
