/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* 按钮样式 */
.btn-primary {
    display: inline-block;
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-secondary {
    display: inline-block;
    background-color: #6c757d;
    color: white;
    padding: 8px 16px;
    border-radius: 5px;
    font-weight: 400;
    transition: background-color 0.3s;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

/* 导航栏样式 */
.navbar {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo h1 {
    color: #007bff;
    font-size: 24px;
    font-weight: 700;
}

.nav-links {
    display: flex;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: #007bff;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger .line {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* Banner样式 */
.banner {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('img/banner.jpg') center/cover no-repeat;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
}

.banner-content {
    max-width: 800px;
    padding: 20px;
}

.banner-content h2 {
    font-size: 36px;
    margin-bottom: 20px;
    font-weight: 700;
}

.banner-content p {
    font-size: 18px;
    margin-bottom: 30px;
    font-weight: 300;
}

/* 部分标题样式 */
.section-title {
    text-align: center;
    font-size: 28px;
    margin-bottom: 40px;
    color: #333;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: #007bff;
}

/* 最新药品推荐样式 */
.featured-products {
    padding: 80px 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.product-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.product-img {
    overflow: hidden;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

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

.product-info {
    padding: 20px;
}

.product-info h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #333;
}

.product-info p {
    color: #666;
    margin-bottom: 15px;
}

.view-more {
    text-align: center;
}

/* 药品列表页样式 */
.product-list {
    padding: 80px 0;
}

.search-bar {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.search-bar input {
    width: 500px;
    padding: 12px 20px;
    border: 1px solid #ddd;
    border-radius: 5px 0 0 5px;
    font-size: 16px;
}

.search-bar button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    font-size: 16px;
}

.product-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.product-table th,
.product-table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.product-table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.product-table tr:hover {
    background-color: #f8f9fa;
}

/* 药品详情页样式 */
.product-detail {
    padding: 80px 0;
}

.detail-container {
    display: grid;
    gap: 40px;
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.detail-img {
    height: 400px;
    overflow: hidden;
}

.detail-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-info {
    padding: 40px;
}

.detail-info h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #333;
}

.detail-info .category {
    display: inline-block;
    background-color: #e9ecef;
    color: #495057;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 20px;
}

.detail-info p {
    margin-bottom: 20px;
    color: #666;
}

.detail-info .features {
    margin-bottom: 30px;
}

.detail-info .features h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
}

.detail-info .features ul {
    padding-left: 20px;
}

.detail-info .features li {
    margin-bottom: 10px;
    list-style-type: disc;
    color: #666;
}

/* 推广服务页样式 */
.services {
    padding: 80px 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.service-card {
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.service-card i {
    font-size: 40px;
    color: #007bff;
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
}

.service-card p {
    color: #666;
}

.pricing {
    background-color: #f8f9fa;
    padding: 60px 0;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.pricing-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.pricing-header {
    background-color: #007bff;
    color: white;
    padding: 20px;
    text-align: center;
}

.pricing-header h3 {
    font-size: 22px;
    margin-bottom: 10px;
}

.pricing-body {
    padding: 30px;
}

.pricing-body ul {
    margin-bottom: 30px;
}

.pricing-body li {
    margin-bottom: 15px;
    padding-left: 25px;
    position: relative;
}

.pricing-body li i {
    color: #28a745;
    position: absolute;
    left: 0;
}

/* 联系我们页样式 */
.contact {
    padding: 80px 0;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.contact-info {
    padding: 40px;
}

.contact-info h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
}

.contact-info p {
    margin-bottom: 20px;
    color: #666;
}

.contact-details {
    margin-bottom: 30px;
}

.contact-details div {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
}

.contact-details i {
    color: #007bff;
    margin-right: 15px;
    margin-top: 5px;
}

.contact-form {
    padding: 40px;
    background-color: #f8f9fa;
}

.contact-form h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.form-group textarea {
    height: 150px;
    resize: vertical;
}

/* 页脚样式 */
footer {
    background-color: #343a40;
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.footer-info h3 {
    font-size: 20px;
    margin-bottom: 15px;
}

.footer-info p {
    color: #adb5bd;
}

.footer-links h4,
.footer-contact h4 {
    font-size: 18px;
    margin-bottom: 15px;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #adb5bd;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.footer-contact p {
    color: #adb5bd;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.footer-contact i {
    margin-right: 10px;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #495057;
    color: #adb5bd;
    font-size: 14px;
}

/* 响应式样式 */
@media (max-width: 992px) {
    .detail-container,
    .contact-container {
        grid-template-columns: 1fr;
    }

    .detail-img {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hamburger {
        display: block;
    }

    .banner-content h2 {
        font-size: 28px;
    }

    .banner-content p {
        font-size: 16px;
    }

    .search-bar input {
        width: 300px;
    }
}

@media (max-width: 576px) {
    .banner {
        height: 400px;
    }

    .banner-content h2 {
        font-size: 24px;
    }

    .section-title {
        font-size: 24px;
    }

    .search-bar input {
        width: 200px;
    }

    .product-table th,
    .product-table td {
        padding: 10px;
        font-size: 14px;
    }

    .detail-info,
    .contact-info,
    .contact-form {
        padding: 20px;
    }
}

/* 移动端导航菜单 */
@media (max-width: 768px) {
    .nav-links.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background-color: white;
        padding: 20px;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active li {
        margin: 10px 0;
    }

    .hamburger.active .line:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .hamburger.active .line:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .line:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
}