/* --- Header 3-Layer Design --- */

/* 第一层 */
.header-top-bar {
    background: #f8f8f8;
    height: 40px;
    line-height: 40px;
    font-size: 12px;
    border-bottom: 1px solid #eee;
}
.header-top-bar .grid-container {
    display: flex;
    justify-content: space-between;
}
.top-bar-nav a {
    margin-left: 20px;
    text-decoration: none;
    color: #666;
}

/* 第二层 */
.header-middle-bar {
    height: 100px;
    display: flex;
    align-items: center;
    background: #fff;
}
.header-middle-bar .grid-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}
.header-logo { flex: 0 0 200px; font-size: 24px; font-weight: bold; }

.header-search { flex: 1; margin: 0 50px; position: relative; }
.search-field { 
    width: 100%; 
    padding: 10px 15px; 
    border: 1px solid #ddd; 
    border-radius: 4px;
}
.search-submit {
    position: absolute;
    right: 5px;
    top: 5px;
    background: #333;
    color: #fff;
    border: none;
    padding: 5px 15px;
    cursor: pointer;
}

.header-wishlist { flex: 0 0 150px; text-align: right; }

/* 第三层 */
.header-bottom-nav {
    border-top: 1px solid #eee;
    border-bottom: 2px solid #333;
    background: #fff;
}
.main-biz-menu {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    gap: 40px;
}
.main-biz-menu a {
    display: block;
    padding: 15px 0;
    text-decoration: none;
    font-weight: 600;
    color: #000;
    font-size: 14px;
}

/* --- Footer Custom --- */
.site-footer {
    padding: 40px 0;
    background: #fcfcfc;
    border-top: 1px solid #eee;
    margin-top: 50px;
}
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.footer-links a {
    margin-left: 25px;
    text-decoration: none;
    color: #666;
    font-size: 13px;
}


/* --- 中間主體內容樣式恢復 --- */

/* 1. Hero 區塊布局 (61.8% 比例) */
.hero-section {
    display: flex;
    gap: 20px;
    margin: 20px 0 40px;
}

.main-banner {
    flex: 0 0 61.8%;
    background: #f0f0f0; /* 灰色占位 */
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #eee;
}

.category-grid {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 10px;
}

.cat-item-box {
    background: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #666;
    font-size: 13px;
    border: 1px solid #eee;
    transition: background 0.3s;
}
.cat-item-box:hover { background: #f0f0f0; }

/* 2. 服務特色區塊 (4列) */
.service-features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 60px 0;
    border-bottom: 1px solid #eee;
    text-align: center;
}

.feature-item h4 {
    margin: 0 0 5px;
    font-size: 14px;
    letter-spacing: 1px;
    color: #333;
}

.feature-item p {
    font-size: 12px;
    color: #999;
}

/* 3. 標題與文章占位樣式 */
.section-title {
    text-align: center;
    margin: 60px 0 40px;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-size: 24px;
}

.site-intro {
    padding: 80px 0;
    background: #fafafa;
    text-align: center;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.blog-placeholder {
    background: #eee;
    height: 200px;
    width: 100%;
}

/* 4. WooCommerce 產品列表強制 4 列修復 */
.woocommerce ul.products.columns-4 {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 30px !important;
    list-style: none;
    padding: 0;
}

.woocommerce ul.products li.product {
    width: 100% !important;
    margin: 0 !important;
    float: none !important;
    text-align: center;
}

/* 5. 移動端適配 */
@media (max-width: 768px) {
    .hero-section { flex-direction: column; }
    .service-features, .blog-grid { grid-template-columns: 1fr 1fr; }
}


/* 1. 移除可能存在的伪元素（如点或序号） */
.woocommerce ul.products::before,
.woocommerce ul.products::after {
    content: none !important;
    display: none !important;
}

/* 2. 强制清除列表项的默认样式 */
.woocommerce ul.products li.product::before {
    content: none !important;
}

.woocommerce ul.products {
    margin-left: 0 !important;
    padding-left: 0 !important;
    list-style: none !important;
}

/* 3. 针对 'first' 类名的边距修正 */
.woocommerce ul.products li.product.first {
    clear: none !important;
    margin-left: 0 !important;
}

/* 4. 确保 Grid 布局下没有多余的空列 */
.woocommerce ul.products.columns-4 {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 30px !important;
}


/* ================================================================
   移动端适配补丁 (针对手机屏幕)
   ================================================================ */

@media (max-width: 768px) {
    
    /* 1. 顶栏：通知和功能菜单垂直堆叠 */
    .header-top-bar {
        height: auto;
        line-height: 1.5;
        padding: 10px 0;
    }
    .header-top-bar .grid-container {
        flex-direction: column;
        text-align: center;
    }
    .top-bar-right {
        margin-top: 5px;
    }
    .top-bar-nav a {
        margin: 0 10px;
    }

    /* 2. 中层：Logo、搜索、收藏垂直排列并对齐 */
    .header-middle-bar {
        height: auto;
        padding: 20px 0;
    }
    .header-middle-bar .grid-container {
        flex-direction: column;
        gap: 15px;
    }
    .header-logo {
        flex: unset;
        text-align: center;
    }
    .header-search {
        width: 100%;
        margin: 0;
    }
    .header-wishlist {
        flex: unset;
        text-align: center;
        width: 100%;
    }

    /* 3. 搜索框修复：防止按钮与输入框重叠 */
    .search-field {
        padding-right: 80px; /* 为右侧按钮留足空间 */
    }

    /* 4. 底层菜单：允许横向滚动或居中 */
    .main-biz-menu {
        gap: 15px;
        flex-wrap: wrap; /* 自动换行 */
        justify-content: center;
        padding-bottom: 10px;
    }
    .main-biz-menu a {
        padding: 8px 0;
        font-size: 12px;
    }

    /* 5. 热门商品：强制 1 行 1 个，图片放大 */
    .woocommerce ul.products.columns-4 {
        grid-template-columns: repeat(1, 1fr) !important; /* 每行显示1个 */
        gap: 20px !important;
    }
    .woocommerce ul.products li.product {
        padding: 15px;
        border-bottom: 1px solid #eee;
    }

    /* 6. 底部版权：文字居中，链接分行显示 */
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    .footer-links {
        display: flex;
        flex-direction: column; /* 链接纵向排列 */
        gap: 10px;
    }
    .footer-links a {
        margin: 0;
        font-size: 14px;
    }

    /* 7. 主体 Hero 区块适配 */
    .hero-section {
        flex-direction: column;
    }
    .service-features {
        grid-template-columns: repeat(1, 1fr); /* 服务特色每行1个 */
        padding: 30px 0;
    }
    .blog-grid {
        grid-template-columns: 1fr; /* 博客文章每行1个 */
    }
}

/* 针对极小屏幕的额外优化 */
@media (max-width: 480px) {
    .header-logo {
        font-size: 20px;
    }
}

.blog-placeholder {
    background: #eee;
    height: 200px;
    width: 100%;
    overflow: hidden; /* 隱藏溢出部分 */
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 確保圖片填滿格子且不變形 */
    transition: transform 0.3s ease;
}

.blog-post:hover img {
    transform: scale(1.05); /* 鼠標懸停縮放效果 */
}


/* 服務特色圖標樣式 */
.feature-item i {
    font-size: 32px; /* 圖標大小，約 32px 高 */
    color: #333; /* 圖標顏色 */
    margin-bottom: 10px;
    display: block;
}

/* 確保服務項目在移動端堆疊 */
@media (max-width: 768px) {
    .service-features {
        grid-template-columns: repeat(1, 1fr); /* 手機端每行1個 */
    }
}



/* --- 增强版服务特色样式 --- */
.service-features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 80px 0;
    text-align: center;
    background: #fff;
}

/* 设置统一的标题大字号与加粗 */
.feature-item h4 {
    font-size: 20px; /* 加大字号 */
    font-weight: 800; /* 极粗 */
    margin: 15px 0 8px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* 描述文字也稍微大一点 */
.feature-item p {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* 为四个板块设置不同的主题色 */
/* 1. 质量认证 - 蓝色 (Professional Blue) */
.feat-quality i, .feat-quality h4 { color: #0056b3; }

/* 2. 7天到货 - 绿色 (Success Green) */
.feat-delivery i, .feat-delivery h4 { color: #28a745; }

/* 3. 安全支付 - 橙色 (Warning Orange) */
.feat-payment i, .feat-payment h4 { color: #fd7e14; }

/* 4. 24/7支持 - 紫色 (Royal Purple) */
.feat-support i, .feat-support h4 { color: #6f42c1; }

/* 图标额外加粗感 */
.feature-item i {
    font-size: 40px;
    margin-bottom: 15px;
    display: block;
}


