/*
Theme Name: By
Theme URI: https://www.byjx7.com/
Author: james
Author URI: https://www.byjx7.com/
Description: 河南滨远机械设备有限公司 - 自定义主题，参照 byjx7.com 设计风格
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: by
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* =============================================
   CSS 变量定义 - 参考 byjx7.com 设计规范
   ============================================= */
:root {
    /* 主色调 */
    --by-color-text: #808285;
    --by-color-link: #4169e1;
    --by-color-link-hover: #191970;
    --by-color-bg: #ffffff;
    --by-color-border: rgba(0, 0, 0, 0.1);
    --by-color-btn-bg: #55555e;
    --by-color-input-bg: #fafafa;
    
    /* 字体 */
    --by-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --by-font-size: 17px;
    --by-line-height: 1.5;
    
    /* 容器 */
    --by-container-width: 1200px;
    --by-container-padding: 20px;
    
    /* 间距 */
    --by-gap: 20px;
    --by-post-gap: 5.34em;
    --by-element-gap: 1.5em;
    
    /* 圆角 */
    --by-border-radius: 2px;
    
    /* 阴影 */
    --by-shadow: 0 4px 10px -2px rgba(0, 0, 0, 0.1);
    
    /* 过渡 */
    --by-transition: all 0.2s linear;
}

/* =============================================
   基础重置与全局样式
   ============================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--by-font-family);
    font-size: var(--by-font-size);
    line-height: var(--by-line-height);
    color: var(--by-color-text);
    background-color: var(--by-color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 响应式容器 */
.site {
    max-width: var(--by-container-width);
    margin: 0 auto;
    padding: 0 var(--by-container-padding);
}

/* 链接样式 */
a {
    color: var(--by-color-link);
    text-decoration: none;
    transition: var(--by-transition);
}

a:hover,
a:focus,
a:visited {
    color: var(--by-color-link-hover);
    text-decoration: none;
}

a:focus {
    outline: thin dotted;
}

a:hover {
    outline: 0;
}

/* 标题样式 */
h1, h2, h3, h4, h5, h6 {
    color: var(--by-color-text);
    margin: 0 0 20px 0;
    line-height: 1.2;
    font-weight: 400;
}

h1 { font-size: 2em; line-height: 1.2; }
h2 { font-size: 1.7em; line-height: 1.3; }
h3 { font-size: 1.5em; line-height: 1.4; }
h4 { font-size: 1.3em; line-height: 1.5; }
h5 { font-size: 1.2em; line-height: 1.6; }
h6 { font-size: 1.1em; line-height: 1.7; }

/* 段落与列表 */
p {
    margin-bottom: var(--by-element-gap);
}

ul, ol {
    margin: 0 0 1.5em 3em;
}

ul {
    list-style: disc;
}

ol {
    list-style: decimal;
}

li > ul,
li > ol {
    margin-bottom: 0;
    margin-left: 1.5em;
}

/* 图片 */
img {
    height: auto;
    max-width: 100%;
    vertical-align: middle;
}

/* 区块引用 */
blockquote {
    border-left: 5px solid var(--by-color-border);
    padding: 20px;
    font-size: 1.2em;
    font-style: italic;
    margin: 0 0 1.5em;
    position: relative;
}

/* =============================================
   顶部导航栏样式
   ============================================= */
.top-bar {
    background-color: #f5f5f5;
    border-bottom: 1px solid #e5e5e5;
}

.top-bar-inner {
    max-width: var(--by-container-width);
    margin: 0 auto;
    padding: 8px var(--by-container-padding);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.top-bar-links a {
    color: var(--by-color-text);
    margin: 0 8px;
}

.top-bar-links a:hover {
    color: var(--by-color-link);
}

.top-bar-links span {
    color: #ddd;
}

.top-bar-contact span {
    color: #666;
    margin-left: 20px;
}

/* =============================================
   头部样式
   ============================================= */
#site-header {
    background-color: var(--by-color-bg);
    position: relative;
    z-index: 99;
}

/* Logo区域 */
.header-logo {
    background-color: var(--by-color-bg);
}

.header-logo-inner {
    max-width: var(--by-container-width);
    margin: 0 auto;
    padding: 15px var(--by-container-padding);
    display: flex;
    align-items: center;
}

/* Logo */
.logo {
    flex-shrink: 0;
}

.logo a {
    display: block;
}

.logo img {
    height: 70px;
    width: auto;
    display: block;
}

/* Header 图片 */
.header-image {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    margin-left: 20px;
}

.header-image img {
    max-height: 70px;
    width: auto;
}

/* 主导航区域 */
.main-nav {
    background-color: #3a3a3a;
    border-bottom: 3px solid var(--by-color-link);
}

.main-nav-inner {
    max-width: var(--by-container-width);
    margin: 0 auto;
    padding: 0 var(--by-container-padding);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 导航菜单 */
.nav-list {
    list-style: none;
    margin: 0 auto;
    padding: 0;
    display: flex;
    gap: 0;
    justify-content: center;
}

.nav-list > li {
    position: relative;
}

.nav-list > li > a {
    display: block;
    padding: 15px 20px;
    color: #fff;
    font-size: 15px;
    transition: var(--by-transition);
}

.nav-list > li > a:hover,
.nav-list > li.current-menu-item > a,
.nav-list > li.current-page-ancestor > a {
    background-color: var(--by-color-link);
}

/* 子菜单 */
.sub-menu-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--by-color-bg);
    border: 1px solid var(--by-color-border);
    box-shadow: var(--by-shadow);
    min-width: 200px;
    z-index: 100;
    list-style: none;
    margin: 0;
    padding: 0;
}

.sub-menu {
    position: relative;
}

.sub-menu > a::after {
    content: '▼';
    font-size: 10px;
    margin-left: 5px;
    vertical-align: middle;
}

.nav-list li:hover > .sub-menu-list {
    display: block;
}

.sub-menu-list a {
    display: block;
    padding: 10px 20px;
    color: var(--by-color-text);
    border-bottom: 1px solid var(--by-color-border);
    font-size: 14px;
}

.sub-menu-list a:last-child {
    border-bottom: none;
}

.sub-menu-list a:hover {
    color: var(--by-color-link);
    background: #f9f9f9;
}

/* 移动端菜单按钮 */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 10px;
    cursor: pointer;
}

.menu-toggle-icon {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    position: relative;
    transition: var(--by-transition);
}

.menu-toggle-icon::before,
.menu-toggle-icon::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: #fff;
    transition: var(--by-transition);
}

.menu-toggle-icon::before {
    top: -7px;
}

.menu-toggle-icon::after {
    bottom: -7px;
}

/* =============================================
   轮播图区域
   ============================================= */
.banner-section {
    width: 100%;
    background-color: var(--by-color-bg);
}

.banner-slider {
    max-width: var(--by-container-width);
    margin: 0 auto;
}

.banner-slider img {
    width: 100%;
    height: auto;
    display: block;
}

/* =============================================
   公司简介区域
   ============================================= */
.about-intro {
    background-color: #f9f9f9;
    border-bottom: 1px solid #e5e5e5;
}

.about-intro-inner {
    max-width: var(--by-container-width);
    margin: 0 auto;
    padding: 15px var(--by-container-padding);
    text-align: center;
}

.about-intro p {
    margin: 0;
    color: #666;
    font-size: 15px;
    line-height: 1.6;
}

/* 轮播图响应式 */
@media screen and (max-width: 768px) {
    .banner-slider img {
        width: 100%;
    }
}

/* =============================================
   主内容区域
   ============================================= */
#main-content {
    max-width: var(--by-container-width);
    margin: 0 auto;
    padding: 40px var(--by-container-padding);
    min-height: 400px;
}

/* 页面标题 */
.page-header {
    margin-bottom: 2.5em;
    padding-bottom: 1.3333em;
    border-bottom: 1px solid var(--by-color-border);
}

.page-title {
    margin: 0;
    font-size: 2.85714rem;
    font-weight: 300;
}

/* 文章列表 */
.post-list {
    width: 100%;
}

/* 文章卡片 */
.post-list article {
    margin-bottom: var(--by-post-gap);
    padding-bottom: var(--by-post-gap);
    border-bottom: 1px solid var(--by-color-border);
}

.post-list article:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* 置顶文章标记 */
.sticky-post {
    display: inline-block;
    background: var(--by-color-link);
    color: #fff;
    padding: 4px 12px;
    border-radius: var(--by-border-radius);
    font-size: 12px;
    margin-bottom: 10px;
}

/* 文章标题 */
.entry-title {
	margin: 0 0 10px 0;
	font-size: 1.5em;
	line-height: 1.3;
	font-weight: 400;
	text-align: center;
}

.entry-title a {
    color: var(--by-color-text);
}

.entry-title a:hover {
    color: var(--by-color-link);
}

/* 文章元信息 */
.entry-meta {
    margin-bottom: 15px;
    font-size: 14px;
    color: #999;
    text-align: center;
}

.entry-meta span {
    margin-right: 15px;
}

.entry-meta a {
    color: #999;
}

.entry-meta a:hover {
    color: var(--by-color-link);
}

/* 文章摘要 */
.entry-summary {
    margin-bottom: 15px;
}

.entry-summary p {
    margin-bottom: 1em;
    color: var(--by-color-text);
}

/* 文章内容 */
.entry-content {
    margin-bottom: 15px;
    word-wrap: break-word;
}

.entry-content p {
    margin-bottom: 1.6em;
}

/* 文章底部 */
.entry-footer {
    font-size: 14px;
    color: #999;
}

.entry-footer .tags,
.entry-footer .categories {
    display: block;
    margin-bottom: 5px;
}

.entry-footer a {
    color: #999;
    margin-right: 10px;
}

.entry-footer a:hover {
    color: var(--by-color-link);
}

/* =============================================
   分页导航
   ============================================= */
.pagination {
    margin-top: 40px;
    text-align: center;
}

.pagination a,
.pagination span,
.pagination .page-numbers {
    display: inline-block;
    min-width: 40px;
    height: 40px;
    line-height: 40px;
    padding: 0 12px;
    margin: 0 4px;
    background: var(--by-color-bg);
    border: 1px solid var(--by-color-border);
    border-radius: var(--by-border-radius);
    color: var(--by-color-text);
    text-decoration: none;
    transition: var(--by-transition);
}

.pagination a:hover {
    background: var(--by-color-btn-bg);
    color: #fff;
    border-color: var(--by-color-btn-bg);
}

.pagination .current,
.pagination .page-numbers.current,
.pagination span.current {
    background: var(--by-color-btn-bg);
    color: #fff;
    border-color: var(--by-color-btn-bg);
}

.pagination .dots,
.pagination .page-numbers.dots,
.pagination span.dots {
    background: transparent;
    border-color: transparent;
    cursor: default;
}

/* =============================================
   侧边栏
   ============================================= */
#secondary {
    margin-top: 40px;
}

.widget {
    margin-bottom: 2.8em;
}

.widget:last-child {
    margin-bottom: 0;
}

.widget-title {
    font-weight: 400;
    margin-bottom: 1em;
    font-size: 1.2em;
    color: var(--by-color-text);
}

.widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.widget li {
    padding: 8px 0;
    border-bottom: 1px solid var(--by-color-border);
}

.widget li:last-child {
    border-bottom: none;
}

/* =============================================
   页脚样式
   ============================================= */
#site-footer {
    background-color: #3a3a3a;
    color: #999;
    padding: 40px 0 0 0;
}

.footer-inner {
    max-width: var(--by-container-width);
    margin: 0 auto;
    padding: 0 var(--by-container-padding);
}

.foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
}

.foot dl {
    margin: 0;
    min-width: 120px;
}

.foot dt {
    margin-bottom: 15px;
    font-weight: 400;
}

.foot dt a {
    color: #fff;
    font-size: 16px;
}

.foot dt a:hover {
    color: var(--by-color-link);
}

.foot dd {
    margin: 0 0 8px 0;
}

.foot dd a {
    color: #999;
    font-size: 14px;
}

.foot dd a:hover {
    color: #fff;
}

/* 联系方式 */
.ftel {
    min-width: 200px;
}

.ftel ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ftel li {
    margin-bottom: 15px;
}

.ftel p {
    margin: 0;
    font-size: 14px;
    color: #999;
}

.ftel h3 {
    margin: 5px 0 0 0;
    font-size: 18px;
    color: #fff;
    font-weight: 400;
}

.ftel a {
    color: #999;
}

.ftel a:hover {
    color: var(--by-color-link);
}

/* 微信二维码 */
.fwx {
    min-width: 100px;
}

.fwx img {
    max-width: 100px;
    border-radius: var(--by-border-radius);
}

/* 清除浮动 */
.c {
    clear: both;
}

/* 版权区域 */
.bq {
    margin-top: 30px;
    padding: 20px 0;
    border-top: 1px solid #555;
    text-align: center;
    font-size: 14px;
}

.bq p {
    margin: 0;
    color: #999;
}

.bq a {
    color: #999;
}

.bq a:hover {
    color: var(--by-color-link);
}

/* 浮动导航 */
.fdh {
    position: fixed;
    right: 20px;
    bottom: 100px;
    list-style: none;
    margin: 0;
    padding: 0;
    z-index: 999;
}

.fdh li {
    margin-bottom: 10px;
}

.fdh a {
    display: block;
    width: 50px;
    height: 50px;
    line-height: 50px;
    text-align: center;
    background: var(--by-color-btn-bg);
    color: #fff;
    border-radius: var(--by-border-radius);
    font-size: 14px;
}

.fdh a:hover {
    background: var(--by-color-link);
    color: #fff;
}

/* =============================================
   按钮样式
   ============================================= */
button,
.button,
input[type="button"],
input[type="submit"] {
    border-radius: 0;
    padding: 18px 30px;
    border: 0;
    box-shadow: none;
    text-shadow: none;
    background: var(--by-color-btn-bg);
    color: #fff;
    cursor: pointer;
    transition: var(--by-transition);
}

button:hover,
.button:hover,
input[type="button"]:hover,
input[type="submit"]:hover {
    box-shadow: none;
    background: var(--by-color-link);
}

button:focus,
.button:focus,
input[type="button"]:focus,
input[type="submit"]:focus {
    box-shadow: none;
    outline: thin dotted;
}

/* =============================================
   表单样式
   ============================================= */
input[type="email"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="text"],
input[type="url"],
textarea,
select {
    color: #666;
    padding: 10px 15px;
    height: auto;
    border: 1px solid var(--by-color-border);
    border-radius: var(--by-border-radius);
    background: var(--by-color-input-bg);
    box-shadow: none;
    box-sizing: border-box;
    transition: var(--by-transition);
    font-size: 100%;
    margin: 0;
    vertical-align: baseline;
}

input[type="email"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
input[type="text"]:focus,
input[type="url"]:focus,
textarea:focus {
    background-color: #fff;
    border-color: var(--by-color-link);
    box-shadow: none;
    outline: none;
}

textarea {
    width: 100%;
    overflow: auto;
}

/* =============================================
   404 页面
   ============================================= */
.error404 .page-header,
.no-results .page-header {
    text-align: center;
    margin-bottom: 2em;
}

.error404 .page-title,
.no-results .page-title {
    font-size: 2em;
    margin-bottom: 20px;
}

.error404 .page-content,
.no-results .page-content {
    text-align: center;
}

/* =============================================
   搜索表单
   ============================================= */
.search-form {
    position: relative;
    max-width: 400px;
    margin: 20px auto;
}

.search-form .search-field {
    width: 100%;
    padding: 12px 50px 12px 15px;
}

.search-form .search-submit {
    position: absolute;
    right: 0;
    top: 0;
    width: 45px;
    height: 100%;
    padding: 0;
    border: none;
    background: var(--by-color-btn-bg);
    color: #fff;
    border-radius: 0 var(--by-border-radius) var(--by-border-radius) 0;
}

/* =============================================
   页面模板样式
   ============================================= */
.page article,
.single article {
    margin-bottom: var(--by-element-gap);
}

.page .entry-header,
.single .entry-header {
    margin-bottom: 2em;
}

.single .post-navigation {
    margin: 40px 0 0 0;
    padding: 20px 0 0 0;
    border-top: 1px solid var(--by-color-border);
    display: flex;
    justify-content: space-between;
}

.single .post-navigation a {
    color: var(--by-color-text);
    padding: 10px 20px;
    border: 1px solid var(--by-color-border);
    border-radius: var(--by-border-radius);
}

.single .post-navigation a:hover {
    background: var(--by-color-link);
    color: #fff;
    border-color: var(--by-color-link);
}

/* =============================================
   响应式设计
   ============================================= */
@media screen and (max-width: 992px) {
    :root {
        --by-container-width: 100%;
    }
    
    .top-bar-inner {
        flex-direction: column;
        gap: 10px;
    }
    
    .top-bar-contact span {
        margin-left: 10px;
    }
    
    .header-logo-inner {
        justify-content: center;
    }
    
    .logo img {
        height: 50px;
    }
    
    .banner-slider img {
        height: auto;
    }
    
    .main-nav-inner {
        flex-wrap: wrap;
    }
    
    .nav-list {
        display: none;
        width: 100%;
        flex-direction: column;
    }
    
    .nav-list.active {
        display: flex;
    }
    
    .nav-list > li > a {
        padding: 12px 20px;
        border-bottom: 1px solid #555;
    }
    
    .sub-menu-list {
        position: static;
        box-shadow: none;
        border: none;
        background: #444;
    }
    
    .sub-menu-list a {
        padding: 10px 30px;
        color: #ccc;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .foot {
        flex-direction: column;
    }
    
    .foot dl {
        width: 100%;
    }

    .pagination a,
    .pagination span,
    .pagination .page-numbers {
        min-width: 36px;
        height: 36px;
        line-height: 36px;
        padding: 0 8px;
        margin: 0 2px;
        font-size: 14px;
    }
}

@media screen and (max-width: 768px) {
    :root {
        --by-font-size: 16px;
    }

    h1 { font-size: 1.8em; }
    h2 { font-size: 1.5em; }
    h3 { font-size: 1.3em; }
    h4 { font-size: 1.1em; }

    .header-inner {
        min-height: 60px;
    }

    #main-content {
        padding: 30px var(--by-container-padding);
    }

    .entry-title {
        font-size: 1.3em;
    }
    
    .ftel h3 {
        font-size: 16px;
    }
    
    .fdh {
        right: 10px;
        bottom: 80px;
    }
    
    .fdh li {
        margin-bottom: 8px;
    }
    
    .fdh a {
        width: 44px;
        height: 44px;
        line-height: 44px;
        font-size: 12px;
    }
}

@media screen and (max-width: 544px) {
    .site-logo img {
        max-height: 40px;
    }
    
    .page-title {
        font-size: 2em;
    }
    
    .entry-meta span {
        display: block;
        margin-right: 0;
        margin-bottom: 5px;
    }
    
    button,
    .button,
    input[type="button"],
    input[type="submit"] {
        width: 100%;
        padding: 15px 20px;
    }
}

/* =============================================
   辅助类
   ============================================= */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 2px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    color: #21759b;
    display: block;
    font-size: 12.25px;
    font-size: 0.875rem;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

.alignleft {
    display: inline;
    float: left;
    margin-right: 1.5em;
}

.alignright {
    display: inline;
    float: right;
    margin-left: 1.5em;
}

.aligncenter {
    clear: both;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.clear::before,
.clear::after,
.site::before,
.site::after {
    content: "";
    display: table;
}

.clear::after,
.site::after {
    clear: both;
}

/* =============================================
   新闻详情页样式
   ============================================= */
.single-news .entry-title {
    text-align: center;
}

/* 隐藏类 */
.hidden {
    display: none !important;
}

/* =============================================
   加载动画
   ============================================= */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* =============================================
   分类页面通用样式
   ============================================= */
.category-header {
    margin-bottom: 2em;
    padding-bottom: 1em;
    border-bottom: 1px solid var(--by-color-border);
}

.category-description {
    margin-top: 1em;
    color: #666;
}

/* =============================================
   产品按分类分组展示样式
   ============================================= */
.products-by-category {
    display: flex;
    flex-direction: column;
    gap: 50px;
}

.category-section {
    background: #fff;
    border: 1px solid var(--by-color-border);
    border-radius: var(--by-border-radius);
    padding: 25px;
}

.category-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 20px;
    margin-bottom: 25px;
    border-bottom: 2px solid var(--by-color-border);
}

.category-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    font-size: 1.3em;
    color: var(--by-color-heading);
}

.category-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--by-color-primary), var(--by-color-secondary));
    border-radius: 50%;
}

.category-icon .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: #fff;
}

.view-more-link {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--by-color-link);
    font-size: 14px;
    text-decoration: none;
    transition: var(--by-transition);
}

.view-more-link:hover {
    color: var(--by-color-link-hover);
}

.view-more-link .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.category-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.category-posts-grid .product-card {
    border: none;
    background: var(--by-color-bg-light);
}

.category-posts-grid .product-card:hover {
    background: #fff;
    box-shadow: var(--by-shadow);
}

.category-posts-grid .product-thumbnail {
    height: 150px;
    border-radius: var(--by-border-radius);
}

.category-posts-grid .product-thumbnail img {
    height: 150px;
}

.category-posts-grid .product-info {
    padding: 15px 0 0 0;
}

.category-posts-grid .product-title {
    font-size: 14px;
    margin: 0;
}

.category-posts-grid .product-title a {
    color: var(--by-color-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.category-posts-grid .product-title a:hover {
    color: var(--by-color-link);
}

.no-posts {
    text-align: center;
    color: #999;
    padding: 40px 0;
}

.sub-category-name {
    margin: 0 0 8px 0;
    font-size: 1.1em;
    color: var(--by-color-heading);
}

.sub-category-desc {
    font-size: 13px;
    color: #666;
    margin: 0 0 10px 0;
    line-height: 1.5;
}

.sub-category-count {
    font-size: 12px;
    color: #999;
}

/* =============================================
   产品列表页样式 - 网格卡片展示
   ============================================= */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background: #fff;
    border: 1px solid var(--by-color-border);
    border-radius: var(--by-border-radius);
    overflow: hidden;
    transition: var(--by-transition);
}

.product-card:hover {
    box-shadow: var(--by-shadow);
    border-color: var(--by-color-link);
}

.product-thumbnail {
    overflow: hidden;
}

.product-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-thumbnail img {
    transform: scale(1.05);
}

.product-info {
    padding: 20px;
}

.product-title {
    margin: 0 0 10px 0;
    font-size: 1.2em;
}

.product-title a {
    color: var(--by-color-text);
}

.product-title a:hover {
    color: var(--by-color-link);
}

.product-excerpt {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #999;
}

.product-more {
    color: var(--by-color-link);
    font-size: 14px;
}

/* =============================================
   产品详情页样式 - 左侧主内容 + 右侧侧边栏布局
   ============================================= */

/* 面包屑导航 */
.single-product .breadcrumbs {
    margin-bottom: 25px;
    padding: 10px 15px;
    background: var(--by-color-bg-light);
    border-radius: var(--by-border-radius);
}

.single-product .breadcrumb-nav {
    font-size: 14px;
}

.single-product .breadcrumb-nav a {
    color: var(--by-color-link);
}

.single-product .breadcrumb-nav a:hover {
    text-decoration: underline;
}

.single-product .breadcrumb-nav .separator {
    margin: 0 8px;
    color: #999;
}

.single-product .breadcrumb-nav .current {
    color: #666;
}

/* 产品页使用简化布局（无侧边栏） */

/* =============================================
   荣誉列表页样式 - 图片墙展示
   ============================================= */
.honors-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.honor-item {
    text-align: center;
}

.honor-thumbnail {
    overflow: hidden;
    border-radius: var(--by-border-radius);
    margin-bottom: 10px;
}

.honor-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.honor-item:hover .honor-thumbnail img {
    transform: scale(1.05);
}

.honor-title {
    margin: 0;
    font-size: 1em;
    font-weight: 400;
}

.honor-title a {
    color: var(--by-color-text);
}

.honor-title a:hover {
    color: var(--by-color-link);
}

/* =============================================
   荣誉详情页样式
   ============================================= */
.single-honor .honor-featured-image {
    margin-bottom: 2em;
}

.single-honor .honor-featured-image img {
    width: 100%;
    max-width: 800px;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: var(--by-border-radius);
}

/* =============================================
   相册列表页样式 - 相册墙/灯箱效果
   ============================================= */
.gallery-wall {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--by-border-radius);
}

.gallery-thumbnail {
    overflow: hidden;
}

.gallery-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-thumbnail img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: #fff;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-title {
    margin: 0 0 5px 0;
    font-size: 1em;
}

.gallery-title a {
    color: #fff;
}

.gallery-title a:hover {
    color: #fff;
    text-decoration: underline;
}

.gallery-date {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
}

/* =============================================
   机械加工列表页样式 - 两栏布局
   ============================================= */
.machining-layout {
    display: flex;
    gap: 30px;
}

.machining-main {
    flex: 1;
}

.machining-sidebar {
    width: 280px;
    flex-shrink: 0;
}

.machining-item {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--by-color-border);
}

.machining-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.machining-content {
    display: flex;
    gap: 25px;
}

.machining-thumbnail {
    flex-shrink: 0;
    width: 280px;
}

.machining-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--by-border-radius);
    transition: var(--by-transition);
}

.machining-thumbnail a:hover img {
    box-shadow: var(--by-shadow);
}

.machining-text {
    flex: 1;
}

.machining-title {
    margin: 0 0 15px 0;
    font-size: 1.3em;
}

.machining-title a {
    color: var(--by-color-text);
}

.machining-title a:hover {
    color: var(--by-color-link);
}

.machining-excerpt {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.8;
}

.machining-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #999;
}

.machining-more {
    color: var(--by-color-link);
}

/* 机械加工侧边栏 */
.sidebar-widget {
    background: #f9f9f9;
    padding: 20px;
    border: 1px solid var(--by-color-border);
    border-radius: var(--by-border-radius);
    margin-bottom: 20px;
}

.sidebar-widget .widget-title {
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--by-color-link);
    font-size: 1.1em;
}

.sidebar-widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-widget li {
    padding: 8px 0;
    border-bottom: 1px solid var(--by-color-border);
}

.sidebar-widget li:last-child {
    border-bottom: none;
}

.sidebar-widget a {
    color: var(--by-color-text);
    font-size: 14px;
}

.sidebar-widget a:hover {
    color: var(--by-color-link);
}

.sidebar-contact p {
    margin: 0 0 8px 0;
    font-size: 14px;
}

.contact-phone {
    font-size: 18px !important;
    font-weight: 600;
    color: var(--by-color-link) !important;
}

/* =============================================
   机械加工详情页样式
   ============================================= */
.single-machining .machining-detail-layout {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.single-machining .machining-detail-image {
    width: 400px;
    flex-shrink: 0;
}

.single-machining .machining-detail-image img {
    width: 100%;
    height: auto;
    border-radius: var(--by-border-radius);
}

.single-machining .machining-detail-content {
    flex: 1;
}

.machining-params {
    margin: 2em 0;
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid var(--by-color-border);
    border-radius: var(--by-border-radius);
}

.machining-params h3 {
    margin-top: 0;
}

.machining-gallery {
    margin: 2em 0;
}

.machining-gallery h3 {
    margin-bottom: 1em;
}

.single-machining .machining-sidebar {
    margin-top: 0;
}

/* =============================================
   响应式适配 - 机械加工
   ============================================= */
@media screen and (max-width: 992px) {
    .machining-layout {
        flex-direction: column;
    }
    
    .machining-sidebar {
        width: 100%;
        order: -1;
    }
    
    .machining-content {
        flex-direction: column;
    }
    
    .machining-thumbnail {
        width: 100%;
    }
    
    .machining-thumbnail img {
        height: 250px;
    }
    
    .single-machining .machining-detail-layout {
        flex-direction: column;
    }
    
    .single-machining .machining-detail-image {
        width: 100%;
    }
}

@media screen and (max-width: 768px) {
    .machining-thumbnail img {
        height: 200px;
    }
}
.single-gallery .gallery-featured-image {
    margin-bottom: 2em;
}

.single-gallery .gallery-images {
    margin-top: 2em;
}

.single-gallery .gallery-images h3 {
    margin-bottom: 1em;
}

/* =============================================
   新闻列表页样式 - 传统列表展示
   ============================================= */
.news-list {
    width: 100%;
}

.news-item {
    display: flex;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid var(--by-color-border);
}

.news-item:last-child {
    border-bottom: none;
}

.news-thumbnail {
    flex-shrink: 0;
}

.news-thumbnail img {
    width: 150px;
    height: 120px;
    object-fit: cover;
    border-radius: var(--by-border-radius);
}

.news-content {
    flex: 1;
}

.news-title {
    margin: 0 0 10px 0;
    font-size: 1.2em;
}

.news-title a {
    color: var(--by-color-text);
}

.news-title a:hover {
    color: var(--by-color-link);
}

.news-meta {
    font-size: 13px;
    color: #999;
    margin-bottom: 10px;
}

.news-meta span {
    margin-right: 15px;
}

.news-excerpt {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.news-more {
    font-size: 14px;
    color: var(--by-color-link);
}

/* =============================================
   新闻详情页样式
   ============================================= */
.single-news .news-featured-image {
    margin-bottom: 2em;
}

.single-news .news-featured-image img {
    width: 100%;
    height: auto;
    border-radius: var(--by-border-radius);
}

/* =============================================
   响应式适配
   ============================================= */
@media screen and (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 20px;
    }
    
    .honors-gallery {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 15px;
    }
    
    .honor-thumbnail img {
        height: 150px;
    }
    
    .gallery-wall {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
    
    .gallery-thumbnail img {
        height: 150px;
    }
    
    .news-item {
        flex-direction: column;
        gap: 15px;
    }
    
    .news-thumbnail img {
        width: 100%;
        height: 180px;
    }
}

@media screen and (max-width: 544px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .product-thumbnail img {
        height: 180px;
    }
    
    .gallery-wall {
        grid-template-columns: 1fr 1fr;
    }
    
    .gallery-overlay {
        opacity: 1;
        padding: 10px;
    }
    
    .gallery-title {
        font-size: 0.9em;
    }
    
    .gallery-date {
        display: none;
    }
}


 /* 修复联系我们封面块 */
.contact-cover {
    /* 1. 给封面块固定宽度和高度，和你的网站容器对齐 */
    max-width: 1200px;
    margin: 0 auto;
    min-height: 400px; /* 固定最小高度，防止变成竖条 */
    width: 100%;
    padding: 0 15px;
}

.contact-cover .wp-block-cover__image-background {
    /* 2. 让图片按容器高度铺满，不被拉伸 */
    object-fit: cover !important; /* 改成cover，保证图片铺满高度 */
    object-position: right center !important; /* 图片靠右显示 */
}

.contact-cover .wp-block-cover__inner-container {
    /* 3. 控制文字容器，让它靠左，不被图片挡住 */
    max-width: 45%; /* 文字只占左边45% */
    margin-left: 2rem;
    padding: 2rem;
    color: #000;
    text-align: left; /* 强制文字左对齐，不居中 */
}

/* =============================================
   首页样式 - 公司产品 / 关于我们 / 新闻
   ============================================= */
.front-page {
    padding-bottom: 40px;
}

.home-section {
    padding: 50px 0;
}

.home-section:nth-child(even) {
    background: var(--by-color-bg-light);
}

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

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--by-color-border);
}

.section-title {
    margin: 0;
    font-size: 1.5em;
    color: var(--by-color-heading);
}

.more-link {
    color: var(--by-color-link);
    font-size: 14px;
    text-decoration: none;
    transition: var(--by-transition);
}

.more-link:hover {
    color: var(--by-color-link-hover);
}

/* 产品网格 */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.products-grid .product-card {
    background: #fff;
    border: 1px solid var(--by-color-border);
    border-radius: var(--by-border-radius);
    overflow: hidden;
    transition: var(--by-transition);
}

.products-grid .product-card:hover {
    box-shadow: var(--by-shadow);
    transform: translateY(-5px);
}

.products-grid .product-thumbnail {
    overflow: hidden;
}

.products-grid .product-thumbnail img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.products-grid .product-card:hover .product-thumbnail img {
    transform: scale(1.05);
}

.products-grid .product-info {
    padding: 15px;
}

.products-grid .product-title {
    margin: 0;
    font-size: 1em;
    text-align: center;
}

.products-grid .product-title a {
    color: var(--by-color-text);
}

.products-grid .product-title a:hover {
    color: var(--by-color-link);
}

/* 关于我们 */
.about-wrapper {
    display: flex;
    gap: 40px;
    align-items: center;
}

.about-image {
    flex: 0 0 400px;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: var(--by-border-radius);
}

.about-content {
    flex: 1;
}

.about-content .section-title {
    margin-bottom: 20px;
}

.about-content p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 15px;
}

.about-more-link {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 25px;
    background: var(--by-color-link);
    color: #fff;
    border-radius: var(--by-border-radius);
    text-decoration: none;
    transition: var(--by-transition);
}

.about-more-link:hover {
    background: var(--by-color-link-hover);
    color: #fff;
}

/* 新闻区域 */
.news-wrapper {
    display: flex;
    gap: 30px;
}

.news-column {
    flex: 1;
}

.news-column .category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--by-color-border);
}

.news-column .section-title {
    font-size: 1.2em;
    margin: 0;
}

.news-column .news-list .news-item {
    padding: 15px 0;
    border-bottom: 1px dashed var(--by-color-border);
}

.news-column .news-list .news-item:last-child {
    border-bottom: none;
}

.news-column .news-list .news-title {
    margin: 0 0 5px 0;
    font-size: 1em;
}

.news-column .news-list .news-title a {
    color: var(--by-color-text);
}

.news-column .news-list .news-title a:hover {
    color: var(--by-color-link);
}

.news-column .news-list .news-meta {
    font-size: 12px;
}

/* 响应式适配 - 首页 */
@media screen and (max-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .about-wrapper {
        flex-direction: column;
    }
    
    .about-image {
        flex: none;
        width: 100%;
        max-width: 500px;
    }
    
    .news-wrapper {
        flex-direction: column;
    }
}

@media screen and (max-width: 768px) {
    .home-section {
        padding: 30px 0;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .products-grid .product-thumbnail img {
        height: 150px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .news-column .category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

@media screen and (max-width: 544px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}