﻿/* ========== 润植源生物官网自定义样式 ========== */
html, body { margin: 0 !important; padding: 0 !important; }

@layer utilities {
    .text-shadow {
        text-shadow: 0 2px 10px rgba(0,0,0,0.22);
    }
    .bg-gradient-main {
        background: linear-gradient(160deg, #777e46 0%, #8c9358 100%);
    }
    .card-shadow {
        box-shadow: 0 4px 22px rgba(119, 126, 70, 0.13);
    }
    .container-wrap {
        max-width: 1240px;
        margin-left: auto;
        margin-right: auto;
        padding-left: 16px;
        padding-right: 16px;
    }
    @media(min-width:768px){
        .container-wrap{
            padding-left: 28px;
            padding-right: 28px;
        }
    }
    .hover-up {
        transition: transform 0.35s ease, box-shadow 0.35s ease;
    }
    .hover-up:hover {
        transform: translateY(-6px);
        box-shadow: 0 10px 30px rgba(119, 126, 70, 0.18);
    }
    .fade-in {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    }
    .fade-in.active {
        opacity: 1;
        transform: translateY(0);
    }
    .carousel-track {
        transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
        will-change: transform;
        transform: translate3d(0,0,0);
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
    }
    .carousel-slide {
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
        transform: translate3d(0,0,0);
    }
    .side-fix-item{
        width:50px;
        height:50px;
        background-color:#777e46;
        color:#fff;
        display:flex;
        align-items:center;
        justify-content:center;
        border-radius:6px;
        cursor:pointer;
        transition:all 0.3s;
        position:relative;
    }
    .side-fix-item:hover{
        background:#5c6235;
    }
    .side-fix-item,
    .side-fix-item:hover,
    .side-fix-item:visited,
    .side-fix-item:active{
        color:#fff;
        text-decoration:none;
    }
    .side-fix-item i{
        color:#fff !important;
    }
    .side-fix-tip{
        position:absolute;
        right:60px;
        background:#333;
        color:#fff;
        padding:6px 12px;
        border-radius:4px;
        white-space:nowrap;
        opacity:0;
        visibility:hidden;
        transition:0.3s;
    }
    .side-fix-item:hover .side-fix-tip{
        opacity:1;
        visibility:visible;
    }
    .nav-link{
        font-size:16px;
        font-weight:700;
        letter-spacing:0.5px;
        transition: color 0.3s ease;
    }
    @media(min-width:1024px){
        .nav-link{
            font-size:17px;
        }
    }
}

html {
    scroll-behavior: smooth;
}

/* ========== Banner文字动画样式 ========== */
.carousel-slide {
    overflow: hidden;
}
.banner-title,
.banner-desc,
.banner-btn {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.carousel-slide.active .banner-title {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 150ms;
}
.carousel-slide.active .banner-desc {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 350ms;
}
.carousel-slide.active .banner-btn {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 550ms;
}

/* ========== 导航滚动动效样式 ========== */
.header-nav {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 50;
    transition: all 0.35s ease-in-out;
}
/* 顶部初始透明状态 */
.header-nav.top-mode {
    background: transparent !important;
    box-shadow: none !important;
    height: 84px;
}
/* 吸顶常态 */
.header-nav.scroll-mode {
    background: rgba(255,255,255,0.92) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    height: 84px;
}

/* 文字颜色切换 + 一级导航无二级菜单悬浮色效 */
.header-nav .nav-link{ font-size:19px; }
.header-nav.top-mode .nav-link{
    color:#ffffff;
}
.header-nav.top-mode .nav-link:hover{
    color: #949b62 !important;
}
.header-nav.top-mode #menuBtn i{
    color:#fff;
}
.header-nav.scroll-mode .nav-active{ color:#949b62 !important; position:relative; }
.header-nav.scroll-mode .nav-link{
    color:#333333;
}
.header-nav.scroll-mode .nav-link:hover{
    color: #777e46 !important;
}
.header-nav.scroll-mode #menuBtn i{
    color:#777e46;
}

/* Logo滤镜变色（单张图实现白色效果） */
.logo-img{
    transition: all 0.35s ease-in-out;
}
.header-nav.top-mode .logo-img{
    filter: brightness(0) invert(1);
}
.header-nav.scroll-mode .logo-img{
    filter: brightness(1) invert(0);
}

/* ==========【已修复】二级下拉菜单样式，解决hover文字看不见 ========== */
/* 顶部透明导航 下拉面板 */
.header-nav.top-mode .group > div{
    background:rgba(0,0,0,0.72);
}
.header-nav.top-mode .group > div a{
    color:#ffffff;
}
.header-nav.top-mode .group > div a:hover{
    background:rgba(255,255,255,0.15) !important;
    color:#ffffff !important;
}
/* 滚动吸顶导航 下拉面板 */
.header-nav.scroll-mode .group > div{
    background:#ffffff;
}
.header-nav.scroll-mode .group > div a{
    color:#333333;
}
.header-nav.scroll-mode .group > div a:hover{
    background:#f6f7f1 !important;
    color:#777e46 !important;
}

/* ========== 内页Banner样式 ========== */
.page-banner {
    height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    position: relative;
}
.page-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(44,46,32,0.55);
}
.page-banner-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: #fff;
}
.page-banner-content h1 {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 12px;
}
.page-banner-content p {
    font-size: 16px;
    opacity: 0.9;
}

/* ========== 面包屑样式 ========== */
.breadcrumb-nav {
    padding: 16px 0;
    background: #f6f7f1;
    font-size: 14px;
    color: #666;
}
.breadcrumb-nav a {
    color: #777e46;
}
.breadcrumb-nav a:hover {
    text-decoration: underline;
}
.breadcrumb-nav span {
    margin: 0 8px;
    color: #999;
}

/* ========== 内页通用样式 ========== */
.section-label {
    display: inline-block;
    font-size: 13px;
    letter-spacing: 3px;
    color: #777e46;
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: uppercase;
}

/* 内页Banner */
.inner-banner{
    height:42vh;
    min-height:280px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position:relative;
    display:block;
    padding-top: 120px;
    padding-bottom: 40px;
}
@media(max-width:768px){
    #home .container-wrap{ padding-top:60px; }
    #home .banner-title{ font-size:22px !important; }
    #home .banner-desc{ font-size:14px !important; }
    #home .carousel-slide{ background-size:cover !important; background-position:center center !important; }
    .inner-banner{
        height:45vh;
        min-height:240px;
        background-size:cover;
        background-position:center center;
        padding-top:100px;
        padding-bottom:30px;
    }
}
.inner-banner::after{
    content:"";
    position:absolute;
    inset:0;
    background:rgba(0,0,0,0.32);
}

/* 内页导航栏默认白色 */
.inner-page .header-nav.top-mode {
    background: rgba(255,255,255,0.92) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    height: 84px;
}
.inner-page .header-nav .nav-link{ font-size:19px; }
.header-nav.top-mode .nav-link{
    color:#333333;
}
.inner-page .header-nav.top-mode .nav-link:hover{
    color: #777e46 !important;
}
.inner-page .header-nav.top-mode #menuBtn i{
    color:#777e46;
}
.inner-page .header-nav.top-mode .logo-img{
    filter: brightness(1) invert(0);
}
.inner-page .header-nav.top-mode .group > div{
    background:#ffffff;
}
.inner-page .header-nav.top-mode .group > div a{
    color:#333333;
}
.inner-page .header-nav.top-mode .group > div a:hover{
    background:#f6f7f1 !important;
    color:#777e46 !important;
}

/* ========== 发展历程时间轴样式 ========== */
.timeline-item {
    opacity: 0;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.timeline-item.timeline-left {
    transform: translateX(-60px);
}
.timeline-item.timeline-right {
    transform: translateX(60px);
}
.timeline-item.visible {
    opacity: 1;
    transform: translateX(0);
}
@media(max-width: 768px) {
    .timeline-item.timeline-left,
    .timeline-item.timeline-right {
        transform: translateY(30px);
    }
}

/* ========== 集团简介图片轮播 ========== */
.about-slider{
    position:relative;
}
.about-slides{
    position:relative;
    width:100%;
    height:100%;
}
.about-slide{
    position:absolute;
    top:0;
    left:0;
    opacity:0;
    transition:opacity 1.2s ease-in-out;
    will-change:opacity;
}
.about-slide.active{
    opacity:1;
    position:relative;
}

/* ========== 产品列表样式 ========== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    background: #777e46;
    color: #fff;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s;
}
.btn-primary:hover {
    background: #5c6235;
    color: #fff;
}
.product-page {
    animation: fadeIn 0.4s ease-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== 新闻详情内容样式 ========== */
.news-content {
    font-size: 16px;
    line-height: 1.9;
    color: #444;
}
.news-content p {
    margin-bottom: 16px;
}
.news-content h3 {
    font-size: 20px;
    font-weight: bold;
    color: #2c2e20;
    margin: 28px 0 16px;
    padding-left: 12px;
    border-left: 3px solid #777e46;
}
.news-content blockquote {
    margin: 20px 0;
    padding: 16px 20px;
    background: #f6f7f1;
    border-left: 4px solid #777e46;
    color: #555;
    font-style: italic;
    border-radius: 0 8px 8px 0;
}
.news-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 16px 0;
}
.news-content ul, .news-content ol {
    margin: 16px 0;
    padding-left: 24px;
}
.news-content li {
    margin-bottom: 8px;
}

/* ========== 产品详情样式 ========== */
.btn-outline {
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    background: transparent;
    color: #777e46;
    border: 1px solid #777e46;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s;
}
.btn-outline:hover {
    background: #777e46;
    color: #fff;
}
.thumb-item {
    transition: all 0.3s;
}
.thumb-item:hover {
    transform: scale(1.05);
}
/* 购买面板 */
.buy-panel {
    display: none;
    position: absolute;
    bottom: calc(100% + 10px);
    left: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    padding: 12px;
    min-width: 200px;
    z-index: 50;
}
.buy-panel.show {
    display: block;
    animation: fadeInUp 0.2s ease-out;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.buy-panel-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.buy-panel-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}
.buy-panel-item:hover {
    background: #f6f7f1;
}
.buy-panel-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    margin-bottom: 6px;
    font-size: 14px;
}
.buy-tmall { background: #ff0036; }
.buy-douyin { background: #000; }
.buy-jd { background: #e1251b; }
.buy-xhs { background: #ff2442; }
.buy-panel-item span {
    font-size: 12px;
    color: #333;
}

/* 新闻列表分页样式 */
.news-pagination li {
    list-style: none;
}
.news-pagination li a,
.news-pagination li span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    color: #4b5563;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
    cursor: pointer;
}
.news-pagination li a:hover {
    border-color: #777e46;
    color: #777e46;
}
.news-pagination li.active a,
.news-pagination li.active span {
    background-color: #777e46;
    color: #fff;
    border-color: #777e46;
    font-weight: 500;
}
/* 上一页/下一页文字替换为箭头图标 */
.news-pagination li:first-child a,
.news-pagination li:last-child a {
    font-size: 0;
}
.news-pagination li:first-child a::before {
    content: "\f104";
    font-family: FontAwesome;
    font-size: 14px;
}
.news-pagination li:last-child a::before {
    content: "\f105";
    font-family: FontAwesome;
    font-size: 14px;
}


/* 导航当前栏目高亮 */
.nav-active{ color:#949b62 !important; position:relative; }
.scroll-mode .nav-active{ color:#777e46 !important; }
/* banner宣传文字阴影 */
#home .banner-title, #home .banner-desc{
    text-shadow: 0 2px 12px rgba(0,0,0,0.45);
}
/* banner标签按钮背景 */
#home .container-wrap a{
    background: rgba(0,0,0,0.55) !important;
    border: 1px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(4px);
    padding: 10px 24px;
    border-radius: 6px;
    display: inline-block;
}
#home .container-wrap a:hover{
    background: rgba(119,126,70,0.85) !important;
}