/* huayiTheme 补充样式：只补模板缺省行为（轮播、视差、首页方块上移），不改模板主体样式 */

/* 首页首屏：原站 Revolution Slider 用的是 sliderLayout:"fullscreen"，
   即首屏铺满整个视口（宽 100%、高 100vh），四个入口方块再上移 200px 压住首屏底部。
   这里用 Bootstrap 3 carousel 复刻同样效果 */
.hero-carousel .item {
    position: relative;
    height: 100vh;
    min-height: 560px;
    background-color: #000;
}

.hero-bg {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.hero-mask {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.35);
}

.hero-caption {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 15px 0;
}

.hero-caption h1 {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 20px;
}

.hero-title-img {
    max-width: 600px;
    width: 100%;
    height: auto;
    margin-bottom: 20px;
}

.hero-caption p {
    font-size: 18px;
    max-width: 760px;
    margin: 0 0 24px;
}

@media (max-width: 767px) {
    .hero-caption h1 { font-size: 32px; }
    .hero-caption p { font-size: 16px; }
}

/* 切换动画：新图叠在旧图上方淡入，旧图保持不透明，避免中间出现黑场；
   同时屏蔽 Bootstrap 默认的左右位移（原站用视差滑动，这里换成更自然的交叉淡入） */
.hero-carousel .carousel-inner {
    position: relative;
}

.hero-carousel .carousel-inner > .item {
    position: absolute;
    top: 0;
    left: 0 !important;
    right: 0 !important;
    width: 100%;
    opacity: 0;
    z-index: 1;
    /* Bootstrap 默认用 translate3d 左右滑动，这里全部关掉，只保留透明度过渡 */
    -webkit-transform: none !important;
    transform: none !important;
    -webkit-transition: opacity 0.7s ease-in-out;
    transition: opacity 0.7s ease-in-out;
}

.hero-carousel .carousel-inner > .item.active {
    position: relative; /* 撑开轮播容器高度，其余张绝对定位叠放 */
    opacity: 1;
    z-index: 2;
}

/* 正在淡入的新图：盖在当前图上方，旧图保持不透明，避免中间出现黑场 */
.hero-carousel .carousel-inner > .item.slide-in {
    display: block;
    z-index: 3;
}

/* 切换时旧图的标题先淡出，避免两张图的文字长时间叠在一起 */
.hero-carousel .carousel-inner > .item .hero-caption {
    -webkit-transition: opacity 0.3s ease-in-out;
    transition: opacity 0.3s ease-in-out;
}

.hero-carousel .carousel-inner > .item.slide-out .hero-caption {
    opacity: 0;
}

/* 首屏图片预加载容器：避免切到第二张时图片还在下载导致黑屏 */
.hero-preload {
    position: absolute;
    left: -9999px;
    top: 0;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
}

.hero-carousel .carousel-control {
    background-image: none;
    width: 60px;
    opacity: 0.6;
}

.hero-carousel .carousel-control:hover {
    opacity: 1;
}

/* 首页四个入口方块：原模板通过 JS 读取 data-margin-top 让方块压住首屏底部 */
@media (min-width: 768px) {
    .equal-height-inner[data-margin-top] {
        position: relative;
        z-index: 3;
    }
}

/* 视差区块：data-bg-img 由 site.js 设置背景图 */
.parallax[data-bg-img] {
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

/* 头部浮在首屏之上：模板用 .no-bg（utility-classes.css）把导航底板设为透明，
   该文件未随主题打包，这里补回来，否则导航会是一条白底白字的空白条 */
.header.header-floating .header-top {
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

.header.header-floating .header-top,
.header.header-floating .header-top .widget a {
    color: #fff;
}

.header.header-floating .header-nav .menuzord {
    background: transparent;
}

.header.header-floating .header-nav .header-nav-wrapper {
    box-shadow: none;
}

/* menuzord 基础样式把 .menuzord * 的字体统一成 Open Sans，会覆盖 .fa 图标字体，
   导致下拉箭头显示成方框；这里把图标字体拉回来 */
.menuzord .fa {
    font-family: 'FontAwesome' !important;
}

/* 模板里 .equal-height-inner 的负外边距/列内边距在窄屏会溢出 1px 左右，统一收一下 */
html, body {
    overflow-x: hidden;
}

/* 原模板的轮播圆点在鼠标移出时会淡出，而且会被上移 200px 的四个方块盖住，
   这里直接不显示，只保留左右箭头 */
.hero-carousel .carousel-indicators {
    display: none;
}

/* ============ 内页 ============ */
.inner-header {
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.inner-header h2 {
    font-size: 30px;
    font-weight: 600;
}

.breadcrumb-white {
    background: transparent;
    padding: 0;
    margin: 0;
}

.breadcrumb-white > li {
    color: rgba(255, 255, 255, 0.85);
}

.breadcrumb-white > li + li:before {
    color: rgba(255, 255, 255, 0.6);
    content: "/ ";
}

.breadcrumb-white > li > a {
    color: #fff;
}

.breadcrumb-white > li.active {
    color: rgba(255, 255, 255, 0.85);
}

/* 侧栏 */
.sidebar .widget-title {
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 1px;
}

.sidebar .list li.active a {
    font-weight: 600;
}

.sidebar .list li a {
    color: #555;
}

.sidebar .list li a:hover {
    color: #1196CC;
}

/* 产品卡片 */
.product-card {
    background: #fff;
    border: 1px solid #e6e6e6;
    transition: all .3s ease;
}

.product-card:hover {
    border-color: #1196CC;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.product-card-thumb {
    display: block;
    overflow: hidden;
}

.product-card-thumb img {
    width: 100%;
    height: 220px;
    object-fit: contain;
    background: #f7f7f7;
    display: block;
}

.product-card-body {
    padding: 15px 10px;
    text-align: center;
}

.product-card-title {
    font-size: 16px;
    font-weight: 500;
}

.product-card-title a {
    color: #333;
}

.product-card-title a:hover {
    color: #1196CC;
}

/* 列表页文章 */
.post-list-item {
    border-bottom: 1px dashed #ddd;
    padding-bottom: 25px;
}

.post-list-thumb {
    float: left;
    width: 220px;
    margin-right: 25px;
}

.post-list-thumb img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.post-list-body {
    overflow: hidden;
}

.post-list-item .post-title {
    font-size: 20px;
}

.post-list-item .post-title a {
    color: #222;
}

.post-list-item .post-title a:hover {
    color: #1196CC;
}

@media (max-width: 767px) {
    .post-list-thumb {
        float: none;
        width: 100%;
        margin: 0 0 15px;
    }

    .post-list-thumb img {
        height: 200px;
    }
}

/* 详情正文 */
.detail-body.richtext {
    overflow-x: auto;
    font-size: 15px;
    line-height: 1.9;
    color: #444;
}

.detail-body.richtext img {
    max-width: 100%;
    height: auto;
}

.detail-body.richtext table {
    max-width: 100%;
    border-collapse: collapse;
}

.detail-body.richtext td,
.detail-body.richtext th {
    border: 1px solid #ddd;
    padding: 6px 8px;
}

.detail-body.richtext p {
    margin-bottom: 12px;
}

/* 产品详情 */
.product-main-image img {
    width: 100%;
    border: 1px solid #eee;
}

.entry-post .entry-title {
    font-size: 24px;
}

/* 企业一览 */
.gallery-card {
    display: block;
    overflow: hidden;
    border: 1px solid #eee;
}

.gallery-card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    transition: transform .4s ease;
}

.gallery-card:hover img {
    transform: scale(1.05);
}

/* 搜索 */
.search-form .form-control {
    height: 48px;
}

.search-form .btn {
    height: 48px;
    padding: 0 25px;
}

/* ============ 产品列表（老站 gallery-item 结构） ============ */
.gallery-item .thumb img {
    width: 100%;
    height: 230px;
    object-fit: contain;
    background: #f7f7f7;
    display: block;
}

.image-box-details {
    border: 1px solid #eee;
    border-top: none;
}

.image-box-details .title {
    font-size: 16px;
    margin: 0;
}

.image-box-details .title a {
    color: #333;
}

.image-box-details .title a:hover {
    color: #1196CC;
}

.product-pager .pagination {
    margin: 0;
}

.product-pager .pagination > li > a {
    color: #555;
    cursor: pointer;
}

/* ============ 产品详情 ============ */
.product-gallery {
    margin-bottom: 20px;
}

.product-gallery #product-main-image {
    width: 100%;
    border: 1px solid #eee;
    background: #f7f7f7;
}

.product-thumbs {
    list-style: none;
    padding: 0;
    margin: 10px -5px 0;
}

.product-thumbs li {
    float: left;
    width: 25%;
    padding: 0 5px;
}

.product-thumbs li a {
    display: block;
    border: 1px solid #eee;
    background: #f7f7f7;
}

.product-thumbs li.active a {
    border-color: #1196CC;
}

.product-thumbs li img {
    width: 100%;
    height: 70px;
    object-fit: contain;
    display: block;
}

.product-summary .product-title {
    font-size: 28px;
    margin-bottom: 10px;
}

.product-subtitle {
    font-size: 15px;
    margin-bottom: 15px;
}

.short-description {
    font-size: 14px;
    line-height: 1.9;
    color: #555;
}

.product-tab {
    margin-top: 10px;
}

.product-tab .tab-content {
    padding: 25px;
    border: 1px solid #eee;
    border-top: none;
    background: #fff;
}

/* 相关产品 */
.product-related .product-card-thumb img {
    height: 150px;
}

/* 产品列表用 Bootstrap 栅格布局，覆盖模板 isotope 默认的 25% 定宽 */
.product-grid .gallery-item {
    width: 100% !important;
    float: none !important;
}

.product-grid .thumb img {
    width: 100%;
    height: 230px;
    object-fit: contain;
    background: #f7f7f7;
    display: block;
}

/* 轻量看图（不依赖第三方插件） */
body.lightbox-open {
    overflow: hidden;
}

.site-lightbox {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.88);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.site-lightbox.open {
    display: flex;
}

.site-lightbox img {
    max-width: 92vw;
    max-height: 88vh;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.site-lightbox .lb-close {
    position: absolute;
    top: 12px;
    right: 22px;
    color: #fff;
    font-size: 42px;
    line-height: 1;
    cursor: pointer;
}

.site-lightbox .lb-prev,
.site-lightbox .lb-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 44px;
    line-height: 1;
    padding: 24px 18px;
    cursor: pointer;
    user-select: none;
}

.site-lightbox .lb-prev { left: 8px; }
.site-lightbox .lb-next { right: 8px; }

.site-lightbox.single .lb-prev,
.site-lightbox.single .lb-next {
    display: none;
}

@media (max-width: 767px) {
    .site-lightbox .lb-prev,
    .site-lightbox .lb-next {
        font-size: 32px;
        padding: 16px 10px;
    }
}

/* 联系页地图截图 */
.contact-map {
    display: block;
    max-width: 900px;
    margin: 0 auto;
    border: 1px solid #eeeeee;
    background: #f7f7f7;
}

.contact-map img {
    display: block;
    width: 100%;
    height: auto;
}
