/* Custom Styles - GREEN THEME */
/* Bootstrap 颜色覆盖 - 替换默认蓝色为绿色 */
/* Bootstrap 5.1 使用直接属性，不是 CSS 变量 */
:root {
    --bs-primary: #2d8a4e;
    --bs-primary-rgb: 45, 138, 78;
}

/* 链接颜色 */
a, a:not([href]):not([class]) {
    color: #2d8a4e;
}
a:hover {
    color: #1a6b3a;
}

/* btn-primary - 覆盖 Bootstrap 5.1 直接属性 */
.btn-primary {
    color: #fff !important;
    background-color: #2d8a4e !important;
    border-color: #2d8a4e !important;
}
.btn-primary:hover {
    color: #fff !important;
    background-color: #1a6b3a !important;
    border-color: #1a6b3a !important;
}
.btn-primary:focus, .btn-primary:active, .btn-primary.active {
    color: #fff !important;
    background-color: #156b35 !important;
    border-color: #156b35 !important;
}
.btn-check:checked + .btn-primary {
    background-color: #156b35 !important;
    border-color: #156b35 !important;
}

/* btn-outline-primary */
.btn-outline-primary {
    color: #2d8a4e !important;
    border-color: #2d8a4e !important;
}
.btn-outline-primary:hover {
    color: #fff !important;
    background-color: #2d8a4e !important;
    border-color: #2d8a4e !important;
}
.btn-outline-primary:focus, .btn-outline-primary:active {
    color: #fff !important;
    background-color: #1a6b3a !important;
    border-color: #1a6b3a !important;
}

/* text-primary */
.text-primary {
    color: #2d8a4e !important;
}

/* bg-primary */
.bg-primary {
    background-color: #2d8a4e !important;
}

/* 表单输入框 focus 颜色 */
.form-control:focus, .form-select:focus {
    border-color: #66bb6a !important;
    box-shadow: 0 0 0 0.25rem rgba(45, 138, 78, 0.25) !important;
}

/* 导航栏 active 链接 */
.nav-link.active, .navbar-nav .nav-link.active {
    color: #2d8a4e !important;
}

/* Swiper 分页 */
.swiper-pagination-bullet-active {
    background: #2d8a4e !important;
}

/* 分页 */
.page-link {
    color: #2d8a4e !important;
}
.page-item.active .page-link {
    color: #fff !important;
    background-color: #2d8a4e !important;
    border-color: #2d8a4e !important;
}

/* Cookie 弹窗按钮 */
.btn-accept {
    background: #2d8a4e !important;
}
.btn-accept:hover {
    background: #1a6b3a !important;
}

/* 文章卡片 hover */
.article-card:hover .article-title-clamp {
    color: #2d8a4e !important;
}

/* 文章详情页 - need-help-card 和 cta-section 阴影 */
.need-help-card:hover {
    box-shadow: 0 10px 25px rgba(45, 138, 78, 0.3) !important;
}
.cta-section:hover {
    box-shadow: 0 15px 35px rgba(45, 138, 78, 0.4) !important;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
    padding-top: 0;
    margin: 0;
}

/* Navbar - 固定定位 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    background-color: #ffffff !important;
    min-height: 70px;
}

.navbar.scrolled {
    background: rgba(255,255,255,0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

.nav-link.active {
    color: #2d8a4e !important;
    font-weight: 600;
}

/* 主内容区域 - 统一的顶部间距 */
.main-content {
    margin-top: 70px;
    min-height: calc(100vh - 300px);
}

/* 响应式调整导航栏高度 */
@media (max-width: 768px) {
    .navbar {
        min-height: 60px;
    }
    
    .main-content {
        margin-top: 60px;
    }
    
    .navbar-brand img {
        height: 32px;
    }
}

/* ========== Hero Slider 样式 - 图片完整显示 ========== */
.hero-slider {
    width: 100%;
    height: 80vh;
    position: relative;
    overflow: hidden;
}

.hero-slide {
    width: 100%;
    height: 80vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    position: relative;
}

/* 图片完整显示方案 - 使用img标签时 */
.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* 如果使用背景图，确保图片完整覆盖 */
.hero-slide-bg {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* 文字覆盖层 - 可选 */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    margin-bottom: 1.5rem;
}

/* Swiper 导航按钮 */
.swiper-button-next,
.swiper-button-prev {
    background: rgba(0,0,0,0.4);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    transition: all 0.3s ease;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: rgba(0,0,0,0.6);
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 18px;
}

.swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: white;
    opacity: 0.8;
}

.swiper-pagination-bullet-active {
    background: #2d8a4e;
    opacity: 1;
}

/* Product Cards */
.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(45,138,78,0.15);
}

.product-card .card-img-top {
    height: 200px;
    object-fit: cover;
}

/* 产品图片包装器 - 1:1比例 */
.product-img-wrapper {
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: hidden;
    background-color: #f8f9fa;
}

.product-img-1x1 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

/* 产品标题两行省略 */
.product-title-clamp {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 42px;
}

/* 产品描述两行省略 */
.product-desc-clamp {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 36px;
}

/* Gallery */
.product-gallery {
    border-radius: 10px;
    overflow: hidden;
}

.gallery-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.thumb-item {
    flex: 1;
    cursor: pointer;
    border-radius: 5px;
    overflow: hidden;
    transition: opacity 0.3s;
}

.thumb-item:hover {
    opacity: 0.8;
}

/* Article Content */
.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

/* 文章卡片样式 */
.card {
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 5px 20px rgba(45,138,78,0.1);
}

/* 文章图片包装器 - 3:2比例 */
.article-img-wrapper {
    position: relative;
    width: 100%;
    padding-top: 66.67%;
    overflow: hidden;
    background-color: #f8f9fa;
}

.article-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

/* 文章标题两行省略 */
.article-title-clamp {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 44px;
    transition: color 0.3s ease;
}

.article-card:hover .article-title-clamp {
    color: #2d8a4e;
}

/* 文章摘要两行省略 */
.article-summary-clamp {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 40px;
}

/* ========== Why Choose SREKE - 功能卡片样式 ========== */
.features-section {
    position: relative;
    background: linear-gradient(135deg, #1a4a2e 0%, #2d8a4e 40%, #1a6b3a 100%);
    overflow: hidden;
}

/* 装饰性背景圆 */
.features-section::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(61,181,99,0.12) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.features-section::after {
    content: '';
    position: absolute;
    bottom: -15%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(45,138,78,0.10) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.features-section .container {
    position: relative;
    z-index: 1;
}

.features-section h2 {
    color: #ffffff;
    font-weight: 700;
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.features-section .lead {
    color: rgba(255,255,255,0.65);
    font-size: 1.05rem;
}

/* 卡片容器 - 玻璃态卡片 */
.feature-card {
    position: relative;
    padding: 32px 20px;
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 20px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
    text-align: center;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent, #3db563), transparent);
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-8px) scale(1.02);
    background: rgba(255,255,255,0.10);
    border-color: rgba(255,255,255,0.20);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.feature-card:hover::before {
    opacity: 1;
}

/* 每个卡片的不同强调色 */
.feature-card-1 { --accent: #3db563; }
.feature-card-2 { --accent: #43e97b; }
.feature-card-3 { --accent: #f5a623; }
.feature-card-4 { --accent: #26c6da; }

/* 图标容器 */
.feature-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.feature-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.4s ease;
}

.feature-card-1 .feature-icon { background: linear-gradient(135deg, #3db563 0%, #66bb6a 100%); }
.feature-card-2 .feature-icon { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }
.feature-card-3 .feature-icon { background: linear-gradient(135deg, #f5a623 0%, #fdd835 100%); }
.feature-card-4 .feature-icon { background: linear-gradient(135deg, #26c6da 0%, #4dd0e1 100%); }

.feature-icon::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.15);
    transition: all 0.4s ease;
}

.feature-card:hover .feature-icon::after {
    inset: -6px;
    border-color: var(--accent, #3db563);
    opacity: 0.5;
}

.feature-icon i {
    font-size: 30px;
    color: white;
    transition: transform 0.4s ease;
}

.feature-card:hover .feature-icon i {
    transform: scale(1.15);
}

/* 卡片文字 */
.feature-card h5 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #ffffff;
}

.feature-card p {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.55);
    margin-bottom: 0;
    line-height: 1.5;
}

/* 卡片底部装饰线（隐藏原始） */
.feature-card-accent {
    display: none;
}

/* Sidebar 样式 */
.list-group-item {
    border-left: none;
    border-right: none;
}

.list-group-item:first-child {
    border-top: none;
}

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

.badge {
    font-weight: normal;
    padding: 5px 10px;
}

/* Footer */
footer {
    margin-top: auto;
}

.social-links a {
    transition: opacity 0.3s;
    display: inline-block;
}

.social-links a:hover {
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 1200px) {
    .hero-title {
        font-size: 2.5rem;
    }
    .hero-subtitle {
        font-size: 1.1rem;
    }
}

@media (max-width: 992px) {
    .hero-title {
        font-size: 2rem;
    }
    .hero-subtitle {
        font-size: 1rem;
    }
    .feature-card {
        padding: 15px;
    }
    .feature-icon {
        width: 60px;
        height: 60px;
    }
    .feature-icon i {
        font-size: 24px;
    }
    .feature-card h5 {
        font-size: 1rem;
    }
    .feature-card p {
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    .hero-slider,
    .hero-slide {
        height: 50vh;
    }
    .hero-title {
        font-size: 1.5rem;
    }
    .hero-subtitle {
        font-size: 0.85rem;
    }
    .hero-btn {
        font-size: 0.8rem;
        padding: 6px 16px;
    }
    .swiper-button-next,
    .swiper-button-prev {
        width: 30px;
        height: 30px;
    }
    .swiper-button-next:after,
    .swiper-button-prev:after {
        font-size: 12px;
    }
    .product-card .card-img-top {
        height: 150px;
    }
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
}

@media (max-width: 576px) {
    .hero-slider,
    .hero-slide {
        height: 40vh;
    }
    .hero-title {
        font-size: 1.2rem;
    }
    .hero-subtitle {
        font-size: 0.7rem;
        margin-bottom: 0.8rem;
    }
    .swiper-button-next,
    .swiper-button-prev {
        display: none;
    }
    .product-card .card-img-top {
        height: 120px;
    }
    .feature-card {
        padding: 24px 14px;
    }
    .feature-card h5 {
        font-size: 0.95rem;
    }
    .feature-card p {
        display: none;
    }
    .feature-icon-wrapper {
        margin-bottom: 14px;
    }
    .feature-icon {
        width: 56px;
        height: 56px;
    }
    .feature-icon i {
        font-size: 22px;
    }
    .features-section h2 {
        font-size: 1.6rem;
    }
    .features-section .lead {
        font-size: 0.9rem;
    }
}

@media (max-width: 380px) {
    .hero-title {
        font-size: 1rem;
    }
    .feature-card {
        padding: 20px 12px;
    }
    .feature-card h5 {
        font-size: 0.85rem;
    }
    .feature-icon-wrapper {
        margin-bottom: 10px;
    }
    .feature-icon {
        width: 48px;
        height: 48px;
    }
    .feature-icon i {
        font-size: 18px;
    }
}

/* 首页 CTA 渐变区域（紫色→绿色）- 覆盖内联样式 */
section[style*="667eea"] {
    background: linear-gradient(135deg, #2d8a4e 0%, #1a6b3a 100%) !important;
}

/* 移动端菜单优化 */
@media (max-width: 991px) {
    .navbar-collapse {
        background: white;
        padding: 15px;
        border-radius: 10px;
        margin-top: 10px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }
    
    .navbar-nav .nav-link {
        padding: 10px 0;
    }
    
    .btn-primary.ms-lg-3 {
        margin-left: 0 !important;
        margin-top: 10px;
        width: 100%;
    }
}

/* Loading Spinner */
.spinner-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Animation */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Utility Classes */
.object-fit-cover {
    object-fit: cover;
}

.min-vh-75 {
    min-height: 75vh;
}

/* ========== OEM/ODM Packaging 首页展示 ========== */
.oem-home-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.oem-description {
    text-align: center;
    font-size: 1rem;
    color: #666;
    max-width: 700px;
    margin: 0 auto 30px auto;
}

/* 包装类型小卡片 */
.packaging-mini-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 18px 10px;
    background: #f0f8f0;
    border-radius: 14px;
    border: 1px solid #d4edd4;
    transition: all 0.3s ease;
    cursor: default;
    height: 100%;
}

.packaging-mini-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(45,138,78,0.1);
    border-color: #8bc34a;
    background: #ffffff;
}

.packaging-mini-card i {
    font-size: 28px;
    color: #2d8a4e;
    transition: transform 0.3s ease;
}

.packaging-mini-card:hover i {
    transform: scale(1.15);
}

.packaging-mini-card span {
    font-size: 0.8rem;
    font-weight: 500;
    color: #444;
    text-align: center;
    line-height: 1.2;
}

@media (max-width: 576px) {
    .packaging-mini-card {
        padding: 12px 8px;
    }
    .packaging-mini-card i {
        font-size: 22px;
    }
    .packaging-mini-card span {
        font-size: 0.7rem;
    }
    .feature-mini {
        padding: 8px 10px;
    }
    .feature-mini span {
        font-size: 0.75rem;
    }
    .oem-home-card {
        padding: 24px 16px;
    }
}

/* 包装特性标签 */
.feature-mini {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #eaf7ea;
    border-radius: 10px;
    transition: all 0.3s ease;
    justify-content: center;
    height: 100%;
}

.feature-mini:hover {
    background: #d4edd4;
    transform: translateY(-2px);
}

.feature-mini i {
    font-size: 16px;
    color: #2d8a4e;
}

.feature-mini span {
    font-size: 0.85rem;
    font-weight: 500;
    color: #444;
}

/* 文章图片自适应 */
.article-content img {
    max-width: 100%;
    height: auto;
}

/* 分页样式 */
.pagination {
    margin-top: 30px;
}

.pagination .page-link {
    color: #2d8a4e;
    border-radius: 5px;
    margin: 0 3px;
}

.pagination .active .page-link {
    background-color: #2d8a4e;
    border-color: #2d8a4e;
    color: white;
}

/* Cookie Consent Banner */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1a3a2a;
    color: white;
    padding: 15px 20px;
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.2);
}
.cookie-consent.show {
    transform: translateY(0);
}
.cookie-consent .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}
.cookie-consent p {
    margin: 0;
    font-size: 14px;
    flex: 1;
}
.cookie-consent .btn-accept {
    background: #2d8a4e;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}
.cookie-consent .btn-accept:hover {
    background: #1a6b3a;
}
.cookie-consent .btn-more {
    background: transparent;
    color: #aaa;
    border: 1px solid #555;
    padding: 8px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    margin-right: 10px;
    transition: all 0.3s;
}
.cookie-consent .btn-more:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}
@media (max-width: 768px) {
    .cookie-consent .container {
        flex-direction: column;
        text-align: center;
    }
    .cookie-consent .btn-more {
        margin-right: 5px;
    }
}

/* ========== 图片精确尺寸 ========== */
/* 首页Banner */
.hero-simple-slider { min-height: 300px; }
@media (max-width: 768px) {
    .hero-simple-slider { min-height: 200px; }
}

/* 首页Featured Products 桌面261x261 */
@media (min-width: 992px) {
    .featured-products .product-img-wrapper { width: 261px; height: 261px; }
}

/* 首页Dosage Form 204x153 */
.category-card img { width: 204px; height: 153px; object-fit: cover; }

/* 产品列表 190x190 */
.products-page .product-img-wrapper { width: 190px; height: 190px; }

/* 产品详情主图 679x679 */
.product-gallery-main .swiper-slide img { max-width: 679px; max-height: 679px; object-fit: contain; }

/* You May Also Like 261x261 */
.related-products .product-img-wrapper { width: 261px; height: 261px; }

/* 文章详情封面 669x376 */
.article-detail-cover { max-width: 669px; max-height: 376px; object-fit: cover; }

/* Popular Posts 107x60桌面 / 186x105手机 */
.article-sidebar img, .popular-posts img { object-fit: cover; }
@media (min-width: 992px) { .article-sidebar img, .popular-posts img { width: 107px; height: 60px; } }
@media (max-width: 768px) { .article-sidebar img, .popular-posts img { width: 186px; height: 105px; } }

/* Blog Posts 90x60桌面 / 186x105手机 */
.blog-posts .card-img-top { object-fit: cover; }
@media (min-width: 992px) { .blog-posts .card-img-top { width: 90px; height: 60px; } }
@media (max-width: 768px) { .blog-posts .card-img-top { width: 186px; height: 105px; } }