/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0066cc;
    --primary-dark: #004499;
    --primary-light: #e6f2ff;
    --secondary-color: #00a86b;
    --text-color: #333333;
    --text-light: #666666;
    --text-muted: #999999;
    --bg-color: #f0f4f8;
    --white: #ffffff;
    --border-color: #e5e7eb;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* 顶部信息栏 */
.top-bar {
    background: var(--primary-dark);
    color: var(--white);
    padding: 8px 0;
    font-size: 13px;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-info {
    display: flex;
    gap: 30px;
}

.top-info span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-info i {
    font-size: 12px;
}

.top-links {
    display: flex;
    gap: 20px;
}

.top-links a {
    color: var(--white);
    opacity: 0.9;
    transition: opacity 0.3s;
}

.top-links a:hover {
    opacity: 1;
}

/* 导航栏 */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar {
    padding: 15px 0;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

.logo i {
    font-size: 32px;
}

.nav-menu {
    display: flex;
    gap: 35px;
}

.nav-menu a {
    font-weight: 500;
    padding: 10px 0;
    position: relative;
    transition: color 0.3s;
}

.nav-menu a:hover,
.nav-menu .active a {
    color: var(--primary-color);
}

.nav-menu .active a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

.nav-actions {
    display: flex;
    gap: 15px;
}

.nav-actions button {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--text-color);
    transition: color 0.3s;
}

.nav-actions button:hover {
    color: var(--primary-color);
}

.menu-toggle {
    display: none;
}

/* 主横幅 */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 80px 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 42px;
    margin-bottom: 15px;
    font-weight: 600;
}

.hero-content p {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 35px;
}

.hero-search {
    max-width: 600px;
    margin: 0 auto 25px;
    display: flex;
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.hero-search input {
    flex: 1;
    padding: 18px 25px;
    border: none;
    font-size: 16px;
    outline: none;
    color: var(--text-color);
}

.hero-search button {
    padding: 18px 35px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-search button:hover {
    background: var(--primary-dark);
}

.hero-tags {
    font-size: 14px;
    opacity: 0.9;
}

.hero-tags span {
    margin-right: 10px;
}

.hero-tags a {
    color: var(--white);
    margin: 0 8px;
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    transition: background 0.3s;
}

.hero-tags a:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* 服务特色 */
.features {
    padding: 40px 0;
    background: var(--white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.feature-item {
    text-align: center;
    padding: 25px;
    border-radius: 8px;
    transition: transform 0.3s;
}

.feature-item:hover {
    transform: translateY(-5px);
}

.feature-item i {
    font-size: 40px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.feature-item h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--text-color);
}

.feature-item p {
    font-size: 14px;
    color: var(--text-light);
}

/* 通用区块标题 */
.section-header {
    margin-bottom: 35px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-header h2 {
    font-size: 28px;
    color: var(--text-color);
    margin-bottom: 0;
}

.section-header p {
    color: var(--text-light);
    margin-top: 8px;
}

.section-header.center {
    text-align: center;
    flex-direction: column;
}

.section-header.center h2 {
    margin-bottom: 10px;
}

.view-all {
    color: var(--primary-color);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: gap 0.3s;
    flex-shrink: 0;
}

.view-all:hover {
    gap: 10px;
}

/* 产品分类 */
.categories {
    padding: 60px 0;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}

.category-item {
    background: var(--white);
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.3s;
}

.category-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.category-item:hover .category-icon {
    background: var(--primary-color);
    color: var(--white);
}

.category-icon {
    width: 70px;
    height: 70px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    transition: all 0.3s;
}

.category-icon i {
    font-size: 28px;
    color: var(--primary-color);
    transition: color 0.3s;
}

.category-item:hover .category-icon i {
    color: var(--white);
}

.category-item h3 {
    font-size: 16px;
    margin-bottom: 8px;
    color: var(--text-color);
}

.category-item p {
    font-size: 13px;
    color: var(--text-muted);
}

/* 产品区域 */
.products {
    padding: 60px 0;
    background: var(--white);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.product-card {
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f4fd 100%);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    border: 1px solid #f0f0f0;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.product-img {
    height: 240px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.product-img img {
    max-width: 100%;
    max-height:100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
    transition: transform 0.3s ease;
}

.product-card:hover .product-img img {
    transform: scale(1.05);
}

.product-img i {
    font-size: 60px;
    color: var(--primary-color);
    opacity: 0.8;
}

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.product-badge.hot {
    background: #ff4d4f;
    color: var(--white);
}

.product-badge.new {
    background: var(--secondary-color);
    color: var(--white);
}

.product-info {
    padding: 20px;
}

.category-tag {
    display: inline-block;
    padding: 4px 10px;
    background: var(--white);
    color: var(--primary-color);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 10px;
}

.product-info h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.product-desc {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 15px;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price {
    font-size: 20px;
    font-weight: 700;
    color: #ff4d4f;
}

.rating {
    color: #faad14;
    font-weight: 500;
}

.rating i {
    margin-right: 3px;
}

/* 医药产品 */
.pharmacy {
    padding: 60px 0;
}

.pharmacy-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.pharmacy-card {
    background: var(--white);
    border-radius: 12px;
    padding: 30px;
    display: flex;
    gap: 25px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    cursor: pointer;
}

.pharmacy-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.pharmacy-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pharmacy-icon i {
    font-size: 32px;
    color: var(--white);
}

.pharmacy-info h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--text-color);
}

.pharmacy-info p {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 15px;
}

.link-btn {
    color: var(--primary-color);
    font-weight: 500;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: gap 0.3s;
}

.link-btn:hover {
    gap: 10px;
}

/* 资讯区域 */
.news {
    padding: 60px 0;
    background: linear-gradient(135deg, #f8fbff 0%, #f0f5fa 100%);
}

.news-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.news-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 102, 204, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
}

.news-card:hover {
    background: #f8fbff;
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.12);
}

.news-card.featured {
    border-left: 4px solid var(--primary-color);
}

.news-img {
    width: 60px;
    height: 60px;
    min-width: 60px;
    background: linear-gradient(135deg, #e6f2ff 0%, #cce5ff 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-img i {
    font-size: 24px;
    color: var(--primary-color);
    opacity: 0.7;
}

.news-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 15px;
}

.news-tag {
    padding: 4px 12px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.news-content h3 {
    flex: 1;
    font-size: 16px;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
}

.news-meta i {
    margin-right: 4px;
}

/* 关于我们 */
.about {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
}

.about-content {
    display: flex;
    gap: 60px;
    align-items: center;
}

.about-text {
    flex: 1;
}

.about-text h2 {
    font-size: 32px;
    margin-bottom: 25px;
}

.about-text p {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 20px;
    line-height: 1.8;
}

.about-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 30px;
}

.about-feature {
    display: flex;
    align-items: center;
    gap: 10px;
}

.about-feature i {
    color: #52c41a;
    font-size: 18px;
}

.about-stats {
    display: flex;
    gap: 50px;
}

.stat-item {
    text-align: center;
    padding: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.stat-number {
    display: block;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.8;
}

/* 联系我们 */
.contact {
    padding: 60px 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.contact-item {
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
    border-radius: 12px;
    padding: 35px 25px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.contact-item:hover {
    transform: translateY(-5px);
}

.contact-item i {
    font-size: 36px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.contact-item h3 {
    font-size: 16px;
    margin-bottom: 10px;
    color: var(--text-color);
}

.contact-item p {
    color: var(--text-light);
    font-size: 14px;
}

/* 页脚 */
.footer {
    background: #1a1f36;
    color: var(--white);
    padding: 50px 0 0;
}

.footer-top {
    display: grid;
    grid-template-columns: 1.5fr repeat(4, 1fr);
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 15px;
}

.footer-logo i {
    font-size: 28px;
}

.footer-col p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: background 0.3s;
}

.social-links a:hover {
    background: var(--primary-color);
}

.footer-col h4 {
    font-size: 16px;
    margin-bottom: 20px;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    transition: color 0.3s;
}

.footer-col ul a:hover {
    color: var(--white);
}

.contact-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.contact-list i {
    color: var(--primary-color);
}

.footer-bottom {
    padding: 20px 0;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    margin-bottom: 5px;
}

.disclaimer {
    font-size: 12px !important;
    opacity: 0.7;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .pharmacy-grid {
        grid-template-columns: 1fr;
    }

    .about-content {
        flex-direction: column;
        text-align: center;
    }

    .about-stats {
        justify-content: center;
    }

    .footer-top {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .top-bar .container {
        flex-direction: column;
        gap: 10px;
    }

    .nav-menu {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .hero-content h1 {
        font-size: 28px;
    }

    .hero-search {
        flex-direction: column;
    }

    .hero-search button {
        justify-content: center;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .news-grid {
        flex-direction: column;
    }

    .news-card {
        flex-wrap: wrap;
    }

    .news-content {
        flex-wrap: wrap;
        gap: 10px;
    }

    .news-content h3 {
        width: 100%;
        white-space: normal;
    }

    .news-meta {
        gap: 10px;
    }

    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-stats {
        flex-direction: column;
        gap: 20px;
    }

    .about-features {
        grid-template-columns: 1fr;
    }

    .footer-top {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-col:first-child {
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }
}
