/*
Theme Name: Safety Boots Export Pro Blue Industrial v2.0.0
Theme URI: https://example.com
Description: 蓝色工业风轴承出口 WordPress 主题，支持中英文双语、响应式布局、全页面可视化编辑
Version: 2.0.0
Author: Safety Boots Co.
Author URI: https://example.com
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: responsive, custom-logo, custom-header, custom-menu, translation-ready, editor-style, wide-blocks, block-patterns
Text Domain: safety-boots-export
*/

/* ================================
   WhatsApp 浮动按钮
================================ */
.float-btns { position: fixed; right: 24px; bottom: 90px; display: flex; flex-direction: column; gap: 12px; z-index: 9999; }
.whatsapp-btn { width: 56px; height: 56px; background: #25D366; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 16px rgba(37,211,102,0.45); text-decoration: none; transition: transform 0.2s, box-shadow 0.2s; cursor: pointer; }
.whatsapp-btn:hover { transform: scale(1.12); box-shadow: 0 6px 24px rgba(37,211,102,0.6); }
.whatsapp-btn i { color: #fff; font-size: 28px; }
.whatsapp-btn .wa-tooltip { position: absolute; right: 68px; background: #25D366; color: #fff; font-size: 13px; padding: 6px 12px; border-radius: 6px; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity 0.2s; }
.whatsapp-btn .wa-tooltip::after { content: ''; position: absolute; right: -6px; top: 50%; transform: translateY(-50%); border: 6px solid transparent; border-left-color: #25D366; border-right: none; }
.whatsapp-btn:hover .wa-tooltip { opacity: 1; }

/* ================================
   回到顶部按钮
================================ */
.back-to-top { position: fixed; right: 24px; bottom: 24px; width: 46px; height: 46px; background: var(--primary-color); border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(30,74,126,0.4); cursor: pointer; border: none; transition: transform 0.2s, opacity 0.3s; opacity: 0; pointer-events: none; z-index: 9999; }
.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover { transform: scale(1.12); }
.back-to-top i { color: #fff; font-size: 18px; }

/* ================================
   顶部信息条
================================ */
.top-info-bar { background: #0f172a; color: rgba(255,255,255,0.85); font-size: 13px; padding: 7px 0; }
.top-info-bar .container { display: flex; justify-content: space-between; align-items: center; }
.top-info-bar a { color: rgba(255,255,255,0.85); transition: color 0.2s; }
.top-info-bar a:hover { color: #fff; }
.top-info-bar span { margin: 0 12px; opacity: 0.4; }

/* ================================
   预览导航（仅预览文件使用）
================================ */
.preview-nav {
    position: fixed; top: 0; left: 0; right: 0;
    background: #0f172a; color: #fff; padding: 12px 0;
    z-index: 10000; box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.preview-nav .container { display: flex; justify-content: space-between; align-items: center; }
.preview-nav-title { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.preview-nav-menu { display: flex; gap: 5px; list-style: none; }
.preview-nav-menu a { color: #fff; padding: 6px 12px; border-radius: 4px; font-size: 13px; transition: all 0.2s; }
.preview-nav-menu a:hover, .preview-nav-menu a.active { background: var(--primary-color); }
.preview-nav-lang { display: flex; gap: 8px; }
.preview-nav-lang a { color: #fff; padding: 4px 10px; border: 1px solid rgba(255,255,255,0.4); border-radius: 3px; font-size: 12px; transition: all 0.2s; }
.preview-nav-lang a.active { background: #fff; color: #0f172a; border-color: #fff; }
.preview-content { margin-top: 48px; }
.preview-section { display: none; padding: 0; }
.preview-section.active { display: block; }

/* ================================
   全局样式
================================ */
:root {
    --primary-color: #1e4a7e;
    --secondary-color: #0f172a;
    --accent-color: #3b82f6;
    --text-dark: #0f172a;
    --text-light: #64748b;
    --bg-light: #f1f5f9;
    --white: #ffffff;
    --border-color: #cbd5e1;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--white);
}

a { text-decoration: none; color: inherit; transition: color 0.3s; }
a:hover { color: var(--primary-color); }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

img { max-width: 100%; height: auto; }

/* ================================
   顶部栏
================================ */
.top-bar {
    background: var(--primary-color);
    color: var(--white);
    padding: 8px 0;
    font-size: 13px;
}
.top-bar .container { display: flex; justify-content: space-between; align-items: center; }
.top-info { display: flex; gap: 20px; }
.top-info span { display: flex; align-items: center; gap: 5px; }

/* ================================
   主导航
================================ */
.main-header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.main-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}
.logo { font-size: 22px; font-weight: 700; color: var(--primary-color); }
.nav-menu { display: flex; list-style: none; gap: 30px; }
.nav-menu li a { font-weight: 500; padding: 10px 0; display: block; }
.nav-menu li a:hover { color: var(--primary-color); }

/* ================================
   Hero 横幅
================================ */
.hero-section {
    position: relative;
    height: 600px;
    background: linear-gradient(135deg, rgba(30,74,126,0.9) 0%, rgba(15,23,42,0.9) 100%);
    background-image: url('images/hero.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
}
.hero-section::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(30,74,126,0.85) 0%, rgba(15,23,42,0.85) 100%);
}
.hero-content { position: relative; z-index: 1; max-width: 800px; padding: 0 20px; }
.hero-content h1 { font-size: 52px; font-weight: 700; margin-bottom: 20px; }
.hero-content p { font-size: 20px; margin-bottom: 30px; opacity: 0.9; }
.hero-content h1,
.hero-content p {
    color: var(--white);
}
.hero-btn {
    display: inline-block;
    background: var(--accent-color);
    color: var(--white);
    padding: 15px 40px;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s;
}
.hero-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(59,130,246,0.4); color: var(--white); }

/* ================================
   页面标题栏
================================ */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 80px 0 40px;
    text-align: center;
    color: var(--white);
}
.page-header h1 { font-size: 42px; margin-bottom: 15px; }
.breadcrumb { display: flex; justify-content: center; gap: 10px; align-items: center; font-size: 14px; }
.breadcrumb a { color: var(--white); }
.breadcrumb span { color: var(--accent-color); }

/* ================================
   通用按钮
================================ */
.btn-primary {
    display: inline-block;
    background: var(--primary-color);
    color: var(--white);
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s;
}
.btn-primary:hover { background: #163b65; transform: translateY(-2px); box-shadow: 0 5px 20px rgba(30,74,126,0.4); color: var(--white); }
.btn-large { padding: 15px 40px; font-size: 16px; }

/* ================================
   Section 标题
================================ */
.section-title { text-align: center; margin-bottom: 60px; }
.section-title h2 { font-size: 36px; color: var(--primary-color); margin-bottom: 15px; }
.section-title p { color: var(--text-light); font-size: 18px; }

/* ================================
   产品卡片
================================ */
.products-section { padding: 80px 0; background: var(--bg-light); }
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px; }
.product-card { background: var(--white); border-radius: 10px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.08); transition: all 0.3s; }
.product-card:hover { transform: translateY(-8px); box-shadow: 0 15px 40px rgba(0,0,0,0.15); }
.product-image { height: 220px; overflow: hidden; position: relative; }
.product-image img { width: 100%; height: 100%; object-fit: cover; }
.product-image .img-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    color: var(--white); font-size: 60px;
}
.product-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.3s;
}
.product-card:hover .product-overlay { opacity: 1; }
.btn-view {
    background: var(--accent-color); color: var(--white);
    padding: 10px 25px; border-radius: 5px;
    font-weight: 600; font-size: 14px;
}
.product-info { padding: 25px; }
.product-info h3 { font-size: 20px; margin-bottom: 8px; }
.product-info p { color: var(--text-light); margin-bottom: 15px; font-size: 14px; }
.product-link { color: var(--primary-color); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 5px; }

/* ================================
   关于我们
================================ */
.about-section { padding: 80px 0; }
.about-content { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-image { height: 400px; border-radius: 10px; overflow: hidden; }
.about-image img { width: 100%; height: 100%; object-fit: cover; }
.about-image .img-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #1e4a7e 0%, #3b82f6 100%);
    color: var(--white); font-size: 80px;
}
.about-text h2 { font-size: 36px; color: var(--primary-color); margin-bottom: 20px; }
.about-text p { color: var(--text-light); margin-bottom: 20px; line-height: 1.8; }

/* ================================
   资质证书
================================ */
.certificates-section { padding: 80px 0; background: var(--bg-light); }
.certificates-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 30px; }
.certificate-card { background: var(--white); padding: 30px; border-radius: 10px; text-align: center; box-shadow: 0 4px 15px rgba(0,0,0,0.08); }
.certificate-icon { font-size: 50px; margin-bottom: 15px; color: var(--primary-color); }
.certificate-card h4 { color: var(--primary-color); margin-bottom: 10px; }
.certificate-card p { color: var(--text-light); font-size: 14px; }

/* ================================
   联系 CTA
================================ */
.contact-cta-section { padding: 80px 0; background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%); }
.contact-cta { text-align: center; color: var(--white); }
.contact-cta h2 { font-size: 36px; margin-bottom: 15px; }
.contact-cta p { font-size: 18px; margin-bottom: 30px; opacity: 0.9; }

/* ================================
   产品页布局
================================ */
.products-page { padding: 60px 0; }
.products-layout { display: grid; grid-template-columns: 280px 1fr; gap: 40px; }
.products-sidebar { background: var(--white); border-radius: 10px; padding: 25px; box-shadow: 0 4px 15px rgba(0,0,0,0.08); height: fit-content; }
.sidebar-title { font-size: 18px; font-weight: 600; color: var(--primary-color); margin-bottom: 20px; padding-bottom: 15px; border-bottom: 2px solid var(--border-color); }
.category-list { list-style: none; margin-bottom: 30px; }
.category-list li { border-bottom: 1px solid var(--border-color); }
.category-list li:last-child { border-bottom: none; }
.category-list a { padding: 12px 0; display: block; color: var(--text-dark); }
.category-list li.active a, .category-list a:hover { color: var(--primary-color); padding-left: 10px; }
.products-main { background: var(--white); border-radius: 10px; padding: 25px; box-shadow: 0 4px 15px rgba(0,0,0,0.08); }

/* ================================
   产品详情
================================ */
.product-detail-section { padding: 60px 0; }
.product-detail-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.main-image { height: 450px; border-radius: 10px; overflow: hidden; margin-bottom: 20px; }
.main-image img { width: 100%; height: 100%; object-fit: cover; }
.main-image .img-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 80px; color: var(--white);
}
.product-info-detail h1 { font-size: 32px; color: var(--primary-color); margin-bottom: 10px; }
.product-price { background: var(--bg-light); padding: 20px; border-radius: 8px; margin-bottom: 25px; }
.price-value { font-size: 24px; color: var(--accent-color); font-weight: 700; }
.specs-table { width: 100%; border-collapse: collapse; margin-bottom: 25px; }
.specs-table tr { border-bottom: 1px solid var(--border-color); }
.specs-table td { padding: 12px 0; }
.specs-table td:first-child { font-weight: 600; width: 150px; }
.product-actions { display: flex; gap: 15px; margin-bottom: 30px; }
.btn-secondary { display: inline-block; background: var(--white); color: var(--primary-color); padding: 12px 30px; border-radius: 5px; font-weight: 600; border: 2px solid var(--primary-color); }
.btn-secondary:hover { background: var(--primary-color); color: var(--white); }

/* ================================
   联系页
================================ */
.contact-page-section { padding: 60px 0; }
.contact-page-layout { display: grid; grid-template-columns: 1fr 1.5fr; gap: 60px; }
.contact-items { display: flex; flex-direction: column; gap: 25px; }
.contact-item { display: flex; gap: 20px; }
.contact-icon { width: 50px; height: 50px; background: var(--primary-color); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--white); font-size: 18px; flex-shrink: 0; }
.contact-form { background: var(--bg-light); padding: 30px; border-radius: 10px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 8px; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 12px 15px; border: 1px solid var(--border-color); border-radius: 5px; font-size: 15px; }
.form-group textarea { min-height: 120px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* ================================
   FAQ
================================ */
.faq-section { padding: 60px 0; }
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item { background: var(--white); border-radius: 10px; margin-bottom: 15px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.faq-question { padding: 20px 25px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.faq-question h4 { font-size: 16px; }
.faq-answer { padding: 0 25px; max-height: 0; overflow: hidden; transition: all 0.3s; }
.faq-item.active .faq-answer { padding: 0 25px 20px; max-height: 500px; }
.faq-answer p { color: var(--text-light); line-height: 1.8; }

/* ================================
   企业优势
================================ */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }
.feature-card { background: var(--white); padding: 30px; border-radius: 10px; text-align: center; box-shadow: 0 4px 15px rgba(0,0,0,0.08); }
.feature-icon { font-size: 50px; color: var(--primary-color); margin-bottom: 15px; }
.feature-card h3 { color: var(--primary-color); margin-bottom: 10px; }
.feature-card p { color: var(--text-light); font-size: 14px; }

/* ================================
   新闻列表
================================ */
.news-section { padding: 60px 0; background: var(--bg-light); }
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px; }
.news-card { background: var(--white); border-radius: 10px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.08); }
.news-image { height: 220px; overflow: hidden; position: relative; }
.news-image img { width: 100%; height: 100%; object-fit: cover; }
.news-image .img-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 60px; color: var(--white);
}
.news-category { position: absolute; top: 15px; left: 15px; background: rgba(0,0,0,0.7); color: var(--white); padding: 5px 12px; border-radius: 20px; font-size: 12px; }
.news-content { padding: 25px; }
.news-meta { display: flex; gap: 10px; margin-bottom: 15px; font-size: 14px; color: var(--text-light); }
.news-title { font-size: 20px; margin-bottom: 15px; }
.news-title a:hover { color: var(--primary-color); }
.news-excerpt { color: var(--text-light); line-height: 1.8; margin-bottom: 15px; font-size: 14px; }
.read-more { color: var(--primary-color); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 5px; }

/* ================================
   分页
================================ */
.pagination { display: flex; justify-content: center; gap: 10px; margin-top: 40px; }
.pagination a { width: 40px; height: 40px; border: 1px solid var(--border-color); border-radius: 5px; display: flex; align-items: center; justify-content: center; color: var(--text-dark); font-size: 14px; }
.pagination a.active { background: var(--primary-color); color: var(--white); border-color: var(--primary-color); }

/* ================================
   页脚
================================ */
.site-footer { background: var(--secondary-color); color: var(--white); padding: 60px 0 30px; }
.footer-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; margin-bottom: 40px; }
.footer-section h4 { font-size: 18px; margin-bottom: 20px; }
.footer-section p, .footer-section a { color: #a0aec0; line-height: 2; display: block; }
.footer-section a:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid #4a5568; padding-top: 30px; text-align: center; color: #a0aec0; }
.social-links { display: flex; gap: 15px; margin-top: 15px; }
.social-links a { width: 40px; height: 40px; background: rgba(255,255,255,0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--white); transition: background 0.3s; }
.social-links a:hover { background: var(--primary-color); }

/* ================================
   语言切换
================================ */
.lang-switch { display: flex; gap: 8px; }
.lang-switch a { padding: 5px 12px; border: 1px solid var(--border-color); border-radius: 3px; font-size: 13px; color: var(--text-dark); transition: all 0.2s; }
.lang-switch a.active { background: var(--primary-color); color: var(--white); border-color: var(--primary-color); }
.main-header .lang-switch { border-left: 1px solid var(--border-color); padding-left: 20px; margin-left: 10px; }

/* ================================
   工具类
================================ */
.text-center { text-align: center; }
.mt-5 { margin-top: 40px; }
.bg-light { background: var(--bg-light); }

/* ================================
   响应式
================================ */
@media (max-width: 992px) {
    .products-layout, .product-detail-layout, .contact-page-layout, .about-content { grid-template-columns: 1fr; }
    .nav-menu { display: none; }
    .hero-content h1 { font-size: 32px; }
    .form-row { grid-template-columns: 1fr; }
}

/* ================================
   页脚联系信息一行显示
================================ */
.footer-contact-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    line-height: 1.8 !important;
    color: #a0aec0 !important;
}
.footer-contact-inline i {
    color: var(--primary-color);
    margin-right: 5px;
}
.footer-contact-inline a {
    color: #a0aec0 !important;
    display: inline !important;
}
.footer-contact-inline a:hover {
    color: var(--white) !important;
}
.footer-contact-inline .separator {
    color: #4a5568;
    margin: 0 5px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .footer-contact-inline {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .footer-contact-inline .separator {
        display: none;
    }
}
/* ================================
   可视化编辑页面支持
================================ */
.page-builder-main {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}
.page-builder-content > * {
    max-width: 100%;
}
.page-builder-content .alignfull,
.front-page-content .alignfull {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}
.page-builder-content .alignwide,
.front-page-content .alignwide {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}
.page-builder-content .wp-block-cover,
.front-page-content .wp-block-cover {
    margin: 0;
}
.front-page-content {
    width: 100%;
    overflow-x: hidden;
}

/* Elementor 全宽修复 */
.elementor-template-full-width .site-main,
.elementor-page .site-main {
    max-width: 100%;
    padding: 0;
}
.elementor-section.elementor-section-boxed > .elementor-container {
    max-width: 1200px;
}
.elementor-section.elementor-section-full_width > .elementor-container {
    max-width: 100%;
}

/* Gutenberg 区块编辑器前端样式优化 */
.entry-content > * {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}
.entry-content .alignfull {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}
.entry-content .alignwide {
    max-width: 1400px;
}
