/* ==========================================
   1. 基础全局设置
========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    color: #333;
    background-color: #f9fafa; /* 给整个网页加一个极浅的灰底，让内容区更突出 */
    width: 100%;
    overflow-x: hidden;
}

a { text-decoration: none; color: #333; }
ul, li { list-style: none; }

/* ==========================================
   2. 全局版心控制
========================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* ==========================================
   3. 导航栏样式
========================================== */
.header-wrapper { 
    background-color: #2c2c2c; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    width: 100%;
}
.header-content {
    height: 90px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}
.logo-group { display: flex; align-items: center; gap: 15px; cursor: pointer; }
.logo-img { height: 60px; width: auto; border-radius: 4px; }
.logo-text-box { display: flex; flex-direction: column; justify-content: center; }
.logo-main-title { display: flex; align-items: baseline; gap: 12px; color: #ffffff; }
.company-name { font-size: 28px; font-weight: 600; letter-spacing: 2px; }
.logo-subtitle { font-size: 11px; letter-spacing: 4px; color: #b0b0b0; text-transform: uppercase; margin-top: 2px; font-family: Arial, sans-serif; }

.nav-links { display: flex; gap: 40px; }
.nav-links a { color: #eeeeee; font-size: 16px; transition: color 0.3s; padding-bottom: 5px; }
.nav-links a:hover { color: #d4a373; border-bottom: 2px solid #d4a373;}

/* ==========================================
   4. 首页模块样式
========================================== */
.hero-section {
    height: 90vh; 
    width: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('images/封面背景一.png') no-repeat center center;
    background-size: cover;
    background-attachment: fixed;
    display: flex;
    align-items: center; 
    justify-content: center; 
    text-align: center;
    color: #ffffff; 
}
.hero-content h1 { font-size: 48px; letter-spacing: 4px; margin-bottom: 20px; text-shadow: 2px 2px 10px rgba(0,0,0,0.5); }
.hero-content p { font-size: 20px; max-width: 800px; margin: 0 auto; line-height: 1.8; color: #f0f0f0; }

.scroll-down { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); animation: bounce 2s infinite; }
.scroll-down span { display: block; width: 20px; height: 20px; border-right: 3px solid #fff; border-bottom: 3px solid #fff; transform: rotate(45deg); }
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateX(-50%) translateY(0);}
    40% {transform: translateX(-50%) translateY(-10px);}
    60% {transform: translateX(-50%) translateY(-5px);}
}

.intro-section {
    height: 80vh; 
    width: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('images/公司图片.png') no-repeat center center;
    background-size: cover;
    display: flex;
    align-items: center; 
    justify-content: center;
    text-align: center;
    color: #ffffff; 
}
.intro-section h2 { font-size: 42px; letter-spacing: 3px; margin-bottom: 30px; text-shadow: 2px 2px 8px rgba(0,0,0,0.6); }
.intro-text p { font-size: 18px; color: #e0e0e0; max-width: 800px; margin: 0 auto; line-height: 2; text-align: left; }

/* 首页大图展示区合并简化 */
/* ==========================================
   图片无缝展示区 (修改后)
========================================== */
.image-showcase-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column; /* 让图片垂直排列 */
    align-items: center;    /* 居中对齐 */
    background-color: #fff; /* 防止图片自带透明底导致透色 */
}

.showcase-img {
    width: 100%;             
    max-width: 1200px;       /* 核心修改：限制最大宽度为 1200px，与你网站的其他版心内容完美对齐 */
    padding: 0 20px;         /* 核心修改：左右强制保留 20px 的安全间距，防止在手机小屏幕上完全贴边 */
    height: auto;            /* 高度自适应，保持原图比例 */
    display: block;          /* 去除 img 标签底部的默认小缝隙 */
    margin: 0;               /* 确保上下依然是 0 间距，保持上下图片的无缝拼接 */
    border: none;
}
/* ==========================================
   5. 产品中心展示区 (网格居中对称排版)
========================================== */
.products-preview { padding: 60px 0; background-color: #fff; }
.products-preview h2 { text-align: center; margin-bottom: 40px; color: #2c3e50; font-size: 30px; }

.product-center-grid {
    display: flex; 
    flex-wrap: wrap; 
    justify-content: center; /* 确保不足4个时也居中 */
    gap: 30px; 
    padding-bottom: 50px;
}
.product-card { 
    background: #fff; 
    border: 1px solid #eee; 
    padding: 20px; 
    border-radius: 12px; 
    width: calc(25% - 23px); /* 一排四个 */
    min-width: 240px; 
    text-align: center; 
    transition: all 0.3s ease; 
}
.product-card:hover { transform: translateY(-10px); box-shadow: 0 15px 30px rgba(0,0,0,0.1); }
.product-card h3 { margin: 15px 0 10px; color: #333; font-size: 20px; }
.product-card p { font-size: 14px; color: #666; margin-bottom: 15px; }

.product-img-wrapper { width: 100%; height: 200px; border-radius: 8px; overflow: hidden; background-color: #f8f9fa; margin-bottom: 15px; }
.product-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s ease; }
.product-card:hover .product-img { transform: scale(1.08); }

.detail-btn { display: inline-block; padding: 8px 15px; background-color: #f4f4f4; color: #333; border-radius: 4px; font-size: 14px; transition: all 0.3s; }
.detail-btn:hover { background-color: #d4a373; color: #fff; }

/* ==========================================
   6. 百科风：药材详情页专属样式 (新增)
========================================== */
.breadcrumb { padding: 20px 0; font-size: 14px; color: #666; }
.breadcrumb a { color: #666; }
.breadcrumb a:hover { color: #d4a373; }
.breadcrumb span { color: #333; font-weight: bold; }

.wiki-container { background-color: #fff; padding: 40px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); margin-bottom: 60px; }
.wiki-title { font-size: 36px; color: #000; margin-bottom: 20px; font-weight: normal; }
.wiki-summary { font-size: 16px; line-height: 1.8; color: #444; margin-bottom: 30px; text-indent: 2em; }

/* 百科资料信息框 */
.wiki-infobox { border: 1px solid #e5e5e5; background-color: #fafafa; padding: 20px; border-radius: 4px; margin-bottom: 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.info-item { font-size: 14px; display: flex; }
.info-label { color: #888; width: 80px; flex-shrink: 0; }
.info-value { color: #333; font-weight: 500; }

/* 百科正文段落 */
.wiki-section { margin-bottom: 40px; }
.wiki-section h2 { font-size: 22px; color: #000; padding-bottom: 10px; margin-bottom: 15px; border-bottom: 2px solid #eaeaea; font-weight: normal; }
.wiki-section p { font-size: 15px; line-height: 1.9; color: #555; margin-bottom: 15px; text-align: justify; }

/* ==========================================
   7. 页脚区
========================================== */
.footer { background-color: #000000; color: #999999; text-align: center; padding: 50px 0; font-size: 14px; line-height: 2; }
.footer p { margin-bottom: 5px; }
.footer a { color: #999999; transition: color 0.3s; }
.footer a:hover { color: #d4a373; }

/* ==========================================
   联系我们模块样式
========================================== */
.contact-section {
    padding: 80px 20px;
    background-color: #ffffff;
}

.contact-flex-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
}

.contact-text-box {
    flex: 1;
}

.section-title {
    font-size: 32px;
    color: #2c2c2c;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 3px;
    background-color: #2c3e50; /* 呼应导航栏深色 */
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.detail-item {
    font-size: 16px;
    line-height: 1.6;
}

.detail-label {
    color: #888;
    font-weight: 500;
}

.detail-value {
    color: #333;
}

.map-wrapper {
    flex: 1.2;
    height: 450px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: 1px solid #eee;
}

#amap-container {
    width: 100%;
    height: 100%;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .contact-flex-container {
        flex-direction: column;
    }
    .map-wrapper {
        width: 100%;
        height: 300px;
    }
}

#contact-image {
    width: 100%;       /* 让包裹图片的容器宽度 100% 铺满屏幕 */
    margin: 0;
    padding: 0;
    overflow: hidden;  
}

.contact-img {
    width: 100%;       /* 强制图片宽度 100% 贴合屏幕边缘 */
    max-height: 300px; /* 限制一下最大高度，防止在大屏幕上图片过高占据整个屏幕 */
    object-fit: cover; /* 保证图片按比例铺满且不变形拉伸 */
    display: block;    /* 消除 img 标签底部的默认小缝隙 */
}