/* assets/css/main.css */

/* 1. 设计系统变量 (Design Tokens) - 仿 Yellowpop 风格 */
:root {
    /* 核心品牌色：大胆、波普 */
    --color-brand-primary: #ff2a6d; /* 霓虹粉 */
    --color-brand-secondary: #05d9e8; /* 霓虹蓝 */
    --color-accent: #FFD700; /* 强调黄 (Yellowpop风) */
    
    /* 背景与文字 */
    --color-bg-main: #0a0a0a; /* 深黑背景，不完全纯黑 */
    --color-bg-secondary: #141414; /* 卡片背景 */
    --color-text-main: #ffffff;
    --color-text-muted: #a0a0a0;
    --color-border: #2a2a2a;
    
    /* 字体与间距 */
    --font-main: 'Outfit', sans-serif;
    --container-width: 1200px;
    --border-radius: 12px;
    --btn-radius: 50px;
    
    /* 阴影特效 */
    --shadow-neon-pink: 0 0 20px rgba(255, 42, 109, 0.4);
    --shadow-neon-blue: 0 0 20px rgba(5, 217, 232, 0.4);
}

/* 2. 全局重置 (避坑基础) */
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: hidden; width: 100%; }
body {
    background-color: var(--color-bg-main);
    color: var(--color-text-main);
    font-family: var(--font-main);
    margin: 0; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; margin: 0; padding: 0; }
img { max-width: 100%; height: auto; display: block; }

.container { 
    width: 100%; padding: 0 20px; margin: 0 auto;
    max-width: var(--container-width); /* 电脑端限制宽度 */
}

/* 3. 组件化样式 (Buttons & Titles) */
.neon-title {
    font-size: 2.5rem; /* 移动端默认大小 */
    font-weight: 800; line-height: 1.1; color: #fff;
    text-shadow: 0 0 15px var(--color-brand-secondary);
}

.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 12px 30px; border-radius: var(--btn-radius);
    font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
    cursor: pointer; transition: all 0.3s ease; border: 2px solid transparent;
    font-size: 0.9rem;
}

/* 实心主按钮 (粉色) */
.btn-primary {
    background: var(--color-brand-primary); color: #fff;
    box-shadow: var(--shadow-neon-pink);
}
.btn-primary:hover {
    background: #fff; color: var(--color-brand-primary);
    border-color: #fff; box-shadow: 0 0 30px var(--color-brand-primary);
}

/* 空心次按钮 (蓝色描边) */
.btn-outline {
    border-color: var(--color-brand-secondary); color: var(--color-brand-secondary);
}
.btn-outline:hover {
    background: var(--color-brand-secondary); color: #000;
    box-shadow: var(--shadow-neon-blue);
}

/* =========================================
   4. 移动优先布局 (Mobile First Styles)
   以下样式默认应用于所有设备 (主要是手机)
   ========================================= */

/* Header (Mobile) */
.site-header {
    padding: 15px 0; background: rgba(10, 10, 10, 0.9);
    position: sticky; top: 0; z-index: 999; backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
}
.header-inner {
    display: flex; flex-direction: column; align-items: center; gap: 15px;
}
.logo { font-size: 1.5rem; font-weight: 800; letter-spacing: 1px; }
.logo .highlight { color: var(--color-brand-secondary); }

/* 导航菜单 (Mobile: 横向滑动) */
.main-navigation {
    width: 100vw; margin-left: -20px; margin-right: -20px; /* 抵消container padding */
    overflow-x: auto; padding: 5px 20px;
    -webkit-overflow-scrolling: touch;
}
.main-navigation ul { display: flex; gap: 10px; white-space: nowrap; }
.main-navigation a {
    display: block; padding: 6px 15px; font-size: 0.8rem; font-weight: 600;
    border: 1px solid var(--color-border); border-radius: 30px; text-transform: uppercase;
}

/* Hero Section (Mobile) */
.hero-section {
    padding: 60px 0; text-align: center; min-height: 50vh;
    display: flex; align-items: center;
    background-size: cover; background-position: center;
}
.hero-content { width: 100%; }
.hero-subtitle { color: var(--color-brand-secondary); font-weight: 700; letter-spacing: 2px; display: block; margin-bottom: 10px; }
.hero-btns { display: flex; flex-direction: column; gap: 15px; margin-top: 30px; }
.hero-btns .btn { width: 100%; }

/* Product Grid (Mobile: 双排方格， Yellowpop风) */
.products-section { padding: 40px 0; }
.product-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
}
.product-card {
    background: var(--color-bg-secondary); border-radius: var(--border-radius);
    padding: 10px; text-align: center; border: 1px solid var(--color-border);
}
.product-card img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 8px; margin-bottom: 10px; }
.product-title { font-size: 0.9rem; margin-bottom: 5px; color: #fff; }
.product-price { font-weight: 800; color: var(--color-brand-primary); }
.product-card .btn { width: 100%; margin-top: 10px; padding: 8px 0; font-size: 0.8rem; }


/* =========================================
   5. 电脑端适配 (Desktop Media Query)
   只有宽度大于 768px 时才生效
   ========================================= */
@media (min-width: 768px) {
    /* Header (Desktop: 横排) */
    .header-inner { flex-direction: row; justify-content: space-between; }
    .main-navigation { width: auto; margin: 0; overflow: visible; padding: 0; }
    .main-navigation a { padding: 8px 25px; font-size: 0.9rem; transition: 0.3s; }
    .main-navigation a:hover {
        border-color: var(--color-brand-secondary);
        background: rgba(5, 217, 232, 0.1);
        box-shadow: var(--shadow-neon-blue);
    }

    /* Hero (Desktop) */
    .hero-section { height: 80vh; background-attachment: fixed; }
    .neon-title { font-size: 4.5rem; }
    .hero-btns { flex-direction: row; justify-content: center; }
    .hero-btns .btn { width: auto; }

    /* Product Grid (Desktop: 4列) */
    .products-section { padding: 80px 0; }
    .product-grid { grid-template-columns: repeat(4, 1fr); gap: 30px; }
    .product-card { padding: 20px; transition: 0.3s; }
    .product-card:hover { transform: translateY(-5px); border-color: var(--color-brand-secondary); }
    .product-title { font-size: 1.1rem; }
}
/* =========================================
   移动端特定页面优化 (About Us)
   放在最底部以确保高优先级
   ========================================= */
@media (max-width: 767px) {
    
    /* 1. 缩小 "The WANSECO Standard" 标题字号 */
    /* 使用更具体的选择器定位到 About 页面里的这个标题 */
    .page-template-page-about .container > h2 {
        font-size: 1.8rem !important; /* 原来是 2.5rem，改小 */
        margin-bottom: 30px !important; /* 减小底部间距 */
    }

    /* 2. 将价值点列表改为双排布局 */
    /* 定位到包含那四个卡片的网格容器 */
    .page-template-page-about .values-grid {
        display: grid !important;
        /* 强制分为两列，每列占一半宽度 */
        grid-template-columns: repeat(2, 1fr) !important;
        /* 减小卡片之间的间距 */
        gap: 15px !important;
    }

    /* 3. 优化单个卡片样式以适应双排 */
    .page-template-page-about .values-grid > div {
        padding: 20px 15px !important; /* 减小内边距，防止内容太挤 */
        /* 可选：如果你希望在手机上隐藏描述文字，只保留图标和标题，取消下面这行的注释 */
        /* height: 140px; display: flex; flex-direction: column; justify-content: center; */
    }

    .page-template-page-about .values-grid > div i {
        font-size: 2rem !important; /* 稍微缩小图标 */
        margin-bottom: 10px !important;
    }

    .page-template-page-about .values-grid > div h3 {
        font-size: 1rem !important; /* 缩小标题字号 */
        margin-bottom: 5px !important;
        /* 可选：配合隐藏描述文字使用 */
        /* margin-bottom: 0 !important; */
    }
    
    .page-template-page-about .values-grid > div p {
        font-size: 0.85rem !important; /* 缩小描述文字号 */
        line-height: 1.3 !important;
        /* 可选：如果你希望在手机上隐藏描述文字，取消下面这行的注释 */
        /* display: none !important; */
    }
}
/* 页脚法律菜单样式 */
.footer-menu-list {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}
.footer-menu-list li a {
    color: #888;
    font-size: 0.85rem;
    text-decoration: none;
}
.footer-menu-list li a:hover {
    color: #fff;
    text-decoration: underline;
}
/* =========================================
   Back to Top Button Styles
   ========================================= */
.btn-neon-float {
    position: fixed; /* 固定定位，使其悬浮 */
    bottom: 30px;    /* 距离底部距离 */
    right: 30px;     /* 距离右侧距离 */
    width: 50px;
    height: 50px;
    /* 使用品牌主色调 (霓虹粉) */
    background: var(--color-brand-primary);
    color: #fff;
    border-radius: 50%; /* 圆形 */
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    z-index: 9999; /* 确保在最上层 */
    cursor: pointer;
    /* 默认状态：隐藏且透明 */
    opacity: 0;
    visibility: hidden;
    /* 平滑过渡动画 */
    transition: all 0.4s ease;
    /* 霓虹发光效果 */
    box-shadow: var(--shadow-neon-pink);
    border: 2px solid transparent;
}

/* 当 JS 添加了 'show' 类名时显示 */
.btn-neon-float.show {
    opacity: 1;
    visibility: visible;
    bottom: 40px; /* 稍微向上浮动一点的效果 */
}

/* 悬停效果 */
.btn-neon-float:hover {
    background: #fff;
    color: var(--color-brand-primary);
    border-color: #fff;
    box-shadow: 0 0 20px var(--color-brand-primary);
    transform: translateY(-5px); /* 鼠标放上去上浮 */
}

/* 移动端适配：稍微调小一点，避免遮挡内容 */
@media (max-width: 767px) {
    .btn-neon-float {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
        font-size: 1rem;
    }
    .btn-neon-float.show {
        bottom: 25px;
    }
}
/* =========================================
   WooCommerce Shop Archive Fixes (V2.0 - 强力覆盖版)
   ========================================= */

/* --- 电脑端强制修复 --- */
/* 使用更高优先级的选择器 body.woocommerce-page */
body.woocommerce-page .products ul,
body.woocommerce-page ul.products {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)) !important;
    gap: 30px !important;
    margin: 40px 0 !important;
    padding: 0 !important;
}

/* 清除浮动 */
body.woocommerce-page ul.products::before,
body.woocommerce-page ul.products::after { content: none !important; display: none !important; }
body.woocommerce-page ul.products li { float: none !important; width: auto !important; }

/* 商品卡片 */
body.woocommerce-page ul.products li.product {
    width: 100% !important;
    background: var(--color-bg-secondary) !important;
    border: 1px solid var(--color-border) !important;
    border-radius: var(--border-radius) !important;
    padding: 20px !important;
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
}

/* 图片修复 */
body.woocommerce-page ul.products li.product a img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
    object-fit: cover !important;
    border-radius: 8px !important;
    margin-bottom: 15px !important;
}

/* 标题和价格 */
body.woocommerce-page ul.products li.product .woocommerce-loop-product__title {
    font-size: 1.1rem !important;
    color: #fff !important;
}
body.woocommerce-page ul.products li.product .price {
    color: var(--color-brand-primary) !important;
    font-weight: 800 !important;
    font-size: 1.2rem !important;
}

/* 按钮修复 */
body.woocommerce-page ul.products li.product .button {
    display: inline-block !important;
    width: auto !important;
    padding: 10px 25px !important;
    background-color: transparent !important;
    color: var(--color-brand-secondary) !important;
    border: 2px solid var(--color-brand-secondary) !important;
    border-radius: 50px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    font-size: 0.9rem !important;
    margin-top: auto !important; /* 推到底部 */
    line-height: 1 !important;
}
body.woocommerce-page ul.products li.product .button:hover {
    background-color: var(--color-brand-secondary) !important;
    color: #000 !important;
}


/* --- 移动端特殊处理 (保持双排) --- */
@media (max-width: 767px) {
    body.woocommerce-page ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }
    body.woocommerce-page ul.products li.product {
        padding: 15px !important;
    }
    body.woocommerce-page ul.products li.product .woocommerce-loop-product__title {
        font-size: 0.9rem !important;
    }
    body.woocommerce-page ul.products li.product .button {
         padding: 8px 15px !important;
         font-size: 0.8rem !important;
         width: 100% !important;
    }
}