/* =========================================
   医疗器械信息网站 - 样式表
   哈尔滨领客专科门诊部有限公司
   ========================================= */

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

:root {
    --primary-color: #0066cc;
    --primary-dark: #004c99;
    --secondary-color: #00a0e9;
    --success-color: #52c41a;
    --danger-color: #ff4d4f;
    --text-color: #333;
    --text-light: #666;
    --border-color: #e8e8e8;
    --bg-light: #f5f5f5;
    --white: #fff;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-light);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--primary-dark);
}

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

/* 头部导航 */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 40px;
    margin-right: 10px;
}

.logo-text {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-color);
}

.nav {
    display: flex;
    gap: 30px;
}

.nav a {
    color: var(--text-color);
    font-size: 15px;
    padding: 8px 0;
    position: relative;
}

.nav a:hover,
.nav a.active {
    color: var(--primary-color);
}

.nav a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
}

/* 横幅 */
.banner {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 60px 0;
    text-align: center;
}

.banner h1 {
    font-size: 32px;
    margin-bottom: 15px;
}

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

/* 页面标题 */
.page-header {
    background: var(--white);
    padding: 30px 0;
    margin-bottom: 30px;
}

.page-header h2 {
    font-size: 24px;
    color: var(--text-color);
}

.breadcrumb {
    margin-top: 10px;
    font-size: 13px;
    color: var(--text-light);
}

.breadcrumb a {
    color: var(--text-light);
}

.breadcrumb span {
    margin: 0 8px;
}

/* 产品卡片 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 30px;
}

.product-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--bg-light);
}

.product-card .info {
    padding: 15px;
}

.product-card h3 {
    font-size: 16px;
    margin-bottom: 8px;
    color: var(--text-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-card p {
    font-size: 13px;
    color: var(--text-light);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* 筛选栏 */
.filter-bar {
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 200px;
    display: flex;
    gap: 10px;
}

.search-box input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.filter-bar select {
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    min-width: 150px;
    cursor: pointer;
}

.filter-bar select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* 按钮 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-color);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-danger {
    background: var(--danger-color);
    color: var(--white);
}

.btn-danger:hover {
    background: #d93636;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 30px 0;
}

.pagination button {
    padding: 8px 14px;
    border: 1px solid var(--border-color);
    background: var(--white);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.pagination button:hover:not(:disabled) {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.pagination button.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 产品详情 */
.product-detail {
    background: var(--white);
    border-radius: 8px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.product-detail .detail-header {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.product-detail .detail-image {
    width: 400px;
    flex-shrink: 0;
}

.product-detail .detail-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
    background: var(--bg-light);
}

.product-detail .detail-info {
    flex: 1;
}

.product-detail .detail-info h1 {
    font-size: 24px;
    margin-bottom: 15px;
}

.product-detail .detail-info .meta {
    color: var(--text-light);
    font-size: 13px;
    margin-bottom: 20px;
}

.product-detail .detail-info .meta span {
    margin-right: 20px;
}

.product-detail .detail-info .introduction {
    line-height: 1.8;
    margin-bottom: 20px;
}

.product-detail .description {
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
}

.product-detail .description h2 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--text-color);
}

.product-detail .description pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: inherit;
    line-height: 1.8;
    background: var(--bg-light);
    padding: 20px;
    border-radius: 8px;
}

/* 联系我们 */
.contact-section {
    background: var(--white);
    border-radius: 8px;
    padding: 40px;
    box-shadow: var(--shadow);
}

.contact-section h2 {
    font-size: 24px;
    margin-bottom: 30px;
    text-align: center;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.contact-item .icon {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.contact-item .text h4 {
    font-size: 16px;
    margin-bottom: 5px;
}

.contact-item .text p {
    color: var(--text-light);
    font-size: 14px;
}

/* 页脚 */
.footer {
    background: var(--text-color);
    color: var(--white);
    padding: 30px 0;
    margin-top: 50px;
    text-align: center;
}

.footer p {
    font-size: 16px;
    opacity: 0.8;
    line-height: 30px;
}

.footer a {
    font-size: 16px;
    opacity: 0.8;
    line-height: 30px;
    color: #FFFFFF;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.empty-state .icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--text-color);
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-color);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 响应式 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        height: auto;
        padding: 15px 0;
    }
    
    .nav {
        margin-top: 15px;
        gap: 15px;
    }
    
    .banner {
        padding: 40px 20px;
    }
    
    .banner h1 {
        font-size: 24px;
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        width: 100%;
    }
    
    .product-detail .detail-header {
        flex-direction: column;
    }
    
    .product-detail .detail-image {
        width: 100%;
    }
    
    .contact-info {
        grid-template-columns: 1fr;
    }
}

/* 图片占位符 */
.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    color: var(--text-light);
    font-size: 14px;
}

/* 列表页样式 */
.list-content {
    background: var(--white);
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow);
}

/* 详情页信息项 */
.info-item {
	display: none;
    margin-bottom: 15px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--border-color);
}

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

.info-item label {
    color: var(--text-light);
    font-size: 13px;
    display: block;
    margin-bottom: 5px;
}

.info-item span {
    font-size: 14px;
}
