/* 药品说明书查询网站 样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
    background: #f4f7fb;
    color: #333;
    line-height: 1.6;
}
a { text-decoration: none; color: inherit; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* 顶栏 */
.site-header {
    background: #1a6fb5;
    color: #fff;
    padding: 14px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
    position: sticky; top: 0; z-index: 100;
}
.site-header .container { display: flex; align-items: center; gap: 24px; }
.logo { font-size: 20px; font-weight: 700; letter-spacing: 1px; color: #fff; white-space: nowrap; display: flex; align-items: center; gap: 9px; }
.logo-icon {
    width: 30px; height: 30px; border-radius: 50%;
    background: rgba(255,255,255,.16); border: 1.5px solid rgba(255,255,255,.75);
    position: relative; flex: none;
}
.logo-icon::before {
    content: ""; position: absolute; left: 22%; right: 22%; top: 46%; height: 4px;
    border-radius: 3px; background: #ffd47a; box-shadow: 0 0 6px rgba(255,212,122,.8);
}
.logo-text { line-height: 1.2; }
.global-search { flex: 1; display: flex; max-width: 560px; }
.global-search input {
    flex: 1; padding: 9px 14px; border: none; border-radius: 6px 0 0 6px; font-size: 14px; outline: none;
}
.global-search button {
    padding: 9px 20px; border: none; background: #ff9f1c; color: #fff; font-size: 14px;
    border-radius: 0 6px 6px 0; cursor: pointer; font-weight: 600;
}
.global-search button:hover { background: #f59200; }

/* 首页 Hero */
.hero {
    background: linear-gradient(135deg, #1a6fb5 0%, #2fa3e0 100%);
    color: #fff;
    text-align: center;
    padding: 56px 16px 48px;
    margin-bottom: 28px;
}
.hero h1 { font-size: 34px; margin-bottom: 12px; }
.hero-sub { font-size: 15px; opacity: .92; max-width: 720px; margin: 0 auto 26px; }
.hero-search { display: flex; justify-content: center; max-width: 640px; margin: 0 auto; }
.hero-search input {
    flex: 1; padding: 14px 18px; border: none; border-radius: 10px 0 0 10px;
    font-size: 15px; outline: none; box-shadow: 0 4px 16px rgba(0,0,0,.18);
}
.hero-search button {
    padding: 14px 32px; border: none; background: #ff9f1c; color: #fff;
    font-size: 16px; font-weight: 700; border-radius: 0 10px 10px 0; cursor: pointer;
}
.hero-search button:hover { background: #f59200; }

/* 区块 */
.block { margin-bottom: 34px; }
.block-title {
    font-size: 20px; margin-bottom: 16px; padding-left: 12px;
    border-left: 4px solid #1a6fb5; display: flex; align-items: baseline; gap: 10px;
}
.block-title .total { font-size: 13px; color: #888; font-weight: 400; }

/* 分类卡片 */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.cat-card {
    background: #fff; border-radius: 12px; padding: 20px 16px; text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,.06); transition: transform .15s, box-shadow .15s;
    border: 1px solid #e8eef5;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(26,111,181,.15); }
.cat-name { font-size: 17px; font-weight: 700; color: #1a6fb5; margin-bottom: 6px; }
.cat-count { font-size: 13px; color: #666; margin-bottom: 10px; }
.cat-go { font-size: 12px; color: #ff9f1c; }

/* 标签行 */
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
    background: #fff; border: 1px solid #dbe6f0; border-radius: 20px;
    padding: 7px 16px; font-size: 14px; color: #1a6fb5; transition: all .15s;
}
.chip em { font-style: normal; color: #999; font-size: 12px; margin-left: 4px; }
.chip:hover { background: #1a6fb5; color: #fff; border-color: #1a6fb5; }
.chip:hover em { color: #ffd; }
.chip-disease { color: #c2412c; border-color: #f0c8c0; }
.chip-disease:hover { background: #c2412c; border-color: #c2412c; }

/* 字母索引 */
.letter-bar { display: flex; flex-wrap: wrap; gap: 8px; }
.letter {
    background: #fff; border: 1px solid #dbe6f0; border-radius: 8px;
    min-width: 52px; text-align: center; padding: 8px 10px;
    font-size: 15px; font-weight: 700; color: #1a6fb5; transition: all .15s;
}
.letter em { display: block; font-style: normal; font-size: 11px; color: #b0becb; font-weight: 400; }
.letter:hover { background: #1a6fb5; color: #fff; border-color: #1a6fb5; }
.letter:hover em { color: #ffd; }

/* 厂家 TOP 榜 */
.more-link { margin-left: auto; font-size: 13px; color: #1a6fb5; font-weight: 400; }
.more-link:hover { text-decoration: underline; }
.top-co-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; }
.top-co-item {
    background: #fff; border: 1px solid #e8eef5; border-radius: 8px;
    padding: 11px 14px; display: flex; align-items: center; gap: 12px; transition: all .15s;
}
.top-co-item:hover { border-color: #1a6fb5; box-shadow: 0 3px 10px rgba(26,111,181,.1); }
.top-co-rank {
    width: 26px; height: 26px; border-radius: 50%; background: #eaf3fb; color: #1a6fb5;
    font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none;
}
.top-co-item:nth-child(-n+3) .top-co-rank { background: #ff9f1c; color: #fff; }
.top-co-name { flex: 1; font-size: 14px; color: #333; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-co-count { font-size: 12px; color: #999; flex: none; }

/* 详情页厂家链接 */
.detail-co-link { margin: 6px 0 14px; font-size: 14px; color: #555; }
.detail-co-link a { color: #1a6fb5; }
.detail-co-link a:hover { text-decoration: underline; }

/* 详情页「随便看看」随机药品 */
.random-box { margin: 18px 0; }
.random-list { display: flex; flex-wrap: wrap; gap: 8px; }
.random-item {
    display: inline-block; padding: 6px 13px; background: #f0f7ff; color: #1a6fb5;
    border: 1px solid #dbe9f7; border-radius: 16px; font-size: 13.5px; text-decoration: none; transition: all .15s;
}
.random-item:hover { background: #d8ecff; border-color: #1a6fb5; }

/* 列表页 */
.list-head { margin: 26px 0 18px; }
.list-head h1 { font-size: 24px; color: #1a3d5c; }
.list-meta { color: #666; font-size: 14px; margin-top: 6px; }
.list-meta strong { color: #c2412c; }
.empty {
    background: #fff; border: 1px dashed #d0dbe6; border-radius: 10px;
    padding: 48px 20px; text-align: center; color: #888; font-size: 15px; margin: 20px 0;
}
.drug-list { display: flex; flex-direction: column; gap: 10px; }
.drug-item {
    background: #fff; border-radius: 10px; padding: 16px 18px;
    display: flex; justify-content: space-between; gap: 16px; align-items: center;
    box-shadow: 0 1px 5px rgba(0,0,0,.05); border: 1px solid #e8eef5; transition: all .15s;
}
.drug-item:hover { border-color: #1a6fb5; box-shadow: 0 4px 14px rgba(26,111,181,.12); }
.drug-main { flex: 1; min-width: 0; }
.drug-name { font-size: 16px; font-weight: 700; color: #1a3d5c; }
.drug-brand { font-size: 13px; color: #888; margin-top: 2px; }
.drug-meta { margin-top: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tag {
    background: #eaf3fb; color: #1a6fb5; font-size: 12px; padding: 2px 10px;
    border-radius: 12px; display: inline-block;
}
.tag-prop { background: #fdeee9; color: #c2412c; }
.approval { font-size: 12px; color: #999; }
.drug-disease {
    margin-top: 6px; font-size: 13px; color: #666;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%;
}
.drug-co { font-size: 13px; color: #888; text-align: right; max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 分页 */
.pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 26px 0; }
.pg {
    padding: 7px 13px; background: #fff; border: 1px solid #dbe6f0;
    border-radius: 6px; font-size: 13px; color: #1a6fb5;
}
.pg.current { background: #1a6fb5; color: #fff; border-color: #1a6fb5; }
.pg:hover { background: #eaf3fb; }
.pg.current:hover { background: #1a6fb5; }
.pg-ellipsis { padding: 7px 6px; color: #999; }

/* 详情页 */
.detail-head { margin: 26px 0 20px; }
.detail-title-row { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.detail-title-row h1 { font-size: 26px; color: #1a3d5c; }
.detail-brand { font-size: 15px; color: #c2412c; font-weight: 600; }
.detail-tags { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.detail-body {
    background: #fff; border-radius: 12px; padding: 8px 20px;
    border: 1px solid #e8eef5; box-shadow: 0 1px 5px rgba(0,0,0,.05);
}
.detail-item {
    display: flex; gap: 18px; padding: 14px 0; border-bottom: 1px solid #eef2f7;
}
.detail-item:last-child { border-bottom: none; }
.detail-label {
    flex: 0 0 150px; font-weight: 700; color: #1a6fb5; font-size: 14px;
    padding-top: 1px;
}
.detail-value { flex: 1; font-size: 14px; color: #444; word-break: break-word; }
.detail-note {
    background: #fff7ec; border: 1px solid #ffe0b0; border-radius: 10px;
    padding: 14px 18px; margin: 20px 0; font-size: 13px; color: #8a5a12;
}
.back-link { margin: 8px 0 20px; }
.back-link a { color: #1a6fb5; font-size: 14px; }
.back-link a:hover { text-decoration: underline; }

/* 页脚 */
.site-footer {
    background: #26384a; color: #aab8c5; text-align: center;
    padding: 26px 16px; margin-top: 40px; font-size: 13px;
}
.site-footer p { margin-bottom: 6px; }

/* 响应式 */
@media (max-width: 700px) {
    .site-header .container { flex-direction: column; gap: 10px; }
    .global-search { max-width: 100%; width: 100%; }
    .hero h1 { font-size: 26px; }
    .hero { padding: 40px 16px 36px; }
    .hero-search { flex-direction: column; gap: 10px; }
    .hero-search input { border-radius: 10px; }
    .hero-search button { border-radius: 10px; padding: 12px; }
    .detail-item { flex-direction: column; gap: 4px; }
    .detail-label { flex: none; }
    .drug-item { flex-direction: column; align-items: flex-start; }
    .drug-co { text-align: left; max-width: 100%; }
    .cat-grid { grid-template-columns: repeat(2, 1fr); }
    .top-co-list { grid-template-columns: 1fr; }
    .letter { min-width: 44px; padding: 7px 6px; font-size: 14px; }
    .block-title { font-size: 18px; }
}

@media (max-width: 420px) {
    .cat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .cat-card { padding: 14px 10px; }
    .cat-name { font-size: 15px; }
    .logo-text { font-size: 17px; }
}
