/* ========== 全局重置与基础样式 ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: #333; background: #f5f5f5;
    line-height: 1.6;
}
a { text-decoration: none; color: inherit; transition: color .2s; }
a:hover { color: #4A90D9; }
ul { list-style: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }

/* ========== 顶部工具栏 ========== */
.top-bar {
    background: #f8f8f8; border-bottom: 1px solid #e5e5e5; font-size: 12px; color: #999;
    line-height: 36px;
}
.top-bar .container { display: flex; justify-content: space-between; align-items: center; }
.top-left a { color: #4A90D9; margin-left: 8px; }
.top-right a { margin-left: 20px; color: #666; cursor: pointer; }
.top-right a:hover { color: #4A90D9; }

/* ========== Header 区域 ========== */
.header {
    background: #fff; padding: 18px 0; border-bottom: 1px solid #eee;
}
.header-content {
    display: flex; align-items: center; gap: 24px;
}
.logo {
    display: flex; align-items: center; gap: 8px; font-size: 26px; font-weight: bold; color: #333;
}
.logo-text { color: #2c3e50; letter-spacing: 2px; }
.city-selector {
    padding: 6px 14px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px;
    cursor: pointer; background: #fff;
}
.search-box {
    display: flex; flex: 1; max-width: 520px; height: 40px; border: 2px solid #ff7043; border-radius: 4px; overflow: hidden;
}
.search-type {
    border: none; background: #fafafa; padding: 0 10px; font-size: 13px; color: #666;
    outline: none; border-right: 1px solid #ddd; cursor: pointer;
}
.search-input {
    flex: 1; border: none; padding: 0 12px; font-size: 13px; outline: none;
}
.search-btn {
    background: #ff7043; color: #fff; border: none; padding: 0 28px;
    font-size: 15px; font-weight: bold; cursor: pointer;
}
.search-btn:hover { background: #f4511e; }
.contact-phone {
    display: flex; align-items: center; gap: 8px;
}
.phone-icon { font-size: 24px; }
.phone-info small { display: block; color: #999; font-size: 11px; }
.phone-info strong { color: #ff7043; font-size: 16px; }

/* ========== 主导航 ========== */
.main-nav { background: #1565C0; }
.nav-list { display: flex; align-items: center; }
.nav-list li a {
    display: block; padding: 14px 30px; color: #fff; font-size: 15px;
    transition: background .2s;
}
.nav-list li a.active,
.nav-list li a:hover { background: #0d47a1; font-weight: bold; }

/* ========== 轮播 Banner ========== */
.banner-section { padding: 20px 0; }
.banner-slider {
    position: relative; width: 100%; height: 340px; border-radius: 8px; overflow: hidden;
}
.banner-slide {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0; transition: opacity .6s ease; z-index: 1;
}
.banner-slide.active { opacity: 1; z-index: 2; }
.banner-inner {
    width: 100%; height: 100%;
    background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 50%, #fbc2eb 100%);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    color: #fff; text-align: center;
}
.banner-inner h2 {
    font-size: 48px; margin-bottom: 12px; text-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.highlight-num { font-size: 64px; color: #fff; font-weight: 900; }
.highlight-num2 { font-size: 64px; color: #ffeb3b; font-weight: 900; }
.banner-inner p { font-size: 18px; margin-bottom: 24px; opacity: .95; }
.banner-btn {
    background: #ff7043; color: #fff; border: none; padding: 12px 40px;
    font-size: 17px; border-radius: 30px; cursor: pointer; font-weight: bold;
    transition: transform .2s, box-shadow .2s;
}
.banner-btn:hover { transform: scale(1.05); box-shadow: 0 4px 16px rgba(255,112,67,.4); }
.banner-dots {
    position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 10px; z-index: 5;
}
.dot {
    width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,.5);
    cursor: pointer; transition: all .3s;
}
.dot.active { background: #fff; transform: scale(1.25); }
.banner-prev, .banner-next {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(0,0,0,.3); color: #fff; border: none;
    width: 44px; height: 44px; border-radius: 50%; font-size: 20px;
    cursor: pointer; z-index: 5; transition: background .2s;
}
.banner-prev { left: 16px; }
.banner-next { right: 16px; }
.banner-prev:hover, .banner-next:hover { background: rgba(0,0,0,.6); }

/* ========== 本地药店 / 商品列表 ========== */
.pharmacy-section { padding: 30px 0 50px; }
.section-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 22px;
}
.section-title { display: flex; align-items: center; gap: 8px; }
.title-icon { font-size: 26px; }
.section-title h2 { font-size: 22px; color: #333; }
.more-link { color: #999; font-size: 14px; }
.more-link:hover { color: #4A90D9; }

.promo-card-area { display: flex; gap: 16px; align-items: stretch; }
.promo-card {
    width: 180px; min-height: 260px; border-radius: 8px; overflow: hidden;
    background: linear-gradient(135deg, #ff9a9e, #fecfef); display: flex;
    flex-direction: column; align-items: center; justify-content: center; gap: 12px;
    transition: transform .2s; flex-shrink: 0;
}
.promo-card:hover { transform: translateY(-4px); }
.promo-icon { font-size: 48px; }
.promo-text { font-size: 20px; font-weight: bold; color: #c0392b; }

.product-grid {
    flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.product-item {
    background: #fff; border-radius: 8px; overflow: hidden;
    transition: box-shadow .2s, transform .2s; display: block;
}
.product-item:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,.1); transform: translateY(-3px);
}
.product-img {
    height: 160px; background: #f0f0f0;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; color: #888; text-align: center; padding: 10px;
}
.product-info { padding: 12px; }
.product-name {
    font-size: 13px; color: #333; line-height: 1.4; height: 38px; overflow: hidden;
    margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.product-price { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.price-current { color: #e74c3c; font-size: 20px; font-weight: bold; }
.price-current small { font-size: 12px; font-weight: normal; }
.price-original { color: #bbb; font-size: 12px; text-decoration: line-through; }
/* ========== 页脚 ========== */
.footer {
    background: #2c3e50; color: #bdc3c7; padding: 40px 0 0;
}
.footer-top { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; padding-bottom: 30px; border-bottom: 1px solid rgba(255,255,255,.08); }
.footer-col h4 { color: #ecf0f1; font-size: 16px; margin-bottom: 16px; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: #bdc3c7; font-size: 13px; }
.footer-col ul li a:hover { color: #fff; }
.qr-code { margin-bottom: 10px; }
.qr-placeholder {
    width: 110px; height: 110px; background: #34495e; border-radius: 8px;
    display: flex; align-items: center; justify-content: center; font-size: 11px; color: #95a5a6;
}
.footer-col:last-child p { font-size: 12px; color: #7f8c8d; }
.footer-bottom { text-align: center; padding: 20px 0; font-size: 12px; color: #7f8c8d; line-height: 1.8; }

/* ========== 响应式 ========== */
@media (max-width: 992px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); }
    .promo-card-area { flex-direction: column; }
    .promo-card { width: 100%; min-height: 80px; flex-direction: row; gap: 16px; padding: 0 24px; }
    .footer-top { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .header-content { flex-wrap: wrap; gap: 12px; }
    .search-box { order: 3; max-width: 100%; flex-basis: 100%; }
    .nav-list { flex-wrap: wrap; }
    .nav-list li a { padding: 10px 16px; font-size: 13px; }
    .banner-inner h2 { font-size: 28px; }
    .highlight-num, .highlight-num2 { font-size: 38px; }
    .product-grid { grid-template-columns: 1fr; }
    .footer-top { grid-template-columns: 1fr; text-align: center; }
}

/* ========== 子页面通用样式 ========== */
.sub-page-banner {
    background: linear-gradient(135deg, #1565C0, #42A5F5); color: #fff;
    padding: 40px 0; text-align: center; margin-bottom: 30px;
}
.sub-page-banner h1 { font-size: 32px; margin-bottom: 8px; }
.sub-page-banner p { opacity: .85; font-size: 15px; }
.page-content { background: #fff; border-radius: 8px; padding: 30px; margin-bottom: 30px; box-shadow: 0 2px 8px rgba(0,0,0,.05); }
.page-content h2 { font-size: 22px; color: #2c3e50; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 2px solid #4A90D9; }
.page-content h3 { font-size: 18px; color: #34495e; margin: 20px 0 12px; }
.page-content p { margin-bottom: 14px; line-height: 1.8; color: #555; }
.breadcrumb { padding: 14px 0; font-size: 13px; color: #999; }
.breadcrumb a { color: #4A90D9; }

/* ========== 表单样式 ========== */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 600; color: #555; font-size: 14px; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%; padding: 10px 14px; border: 1px solid #ddd; border-radius: 4px;
    font-size: 14px; outline: none; transition: border-color .2s;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: #4A90D9; }
.form-group textarea { resize: vertical; min-height: 120px; }
.btn-submit {
    background: #ff7043; color: #fff; border: none; padding: 12px 40px;
    border-radius: 4px; font-size: 16px; cursor: pointer; font-weight: bold;
    transition: background .2s;
}
.btn-submit:hover { background: #f4511e; }

/* ========== 列表卡片样式 ========== */
.info-card {
    background: #fff; border-radius: 8px; padding: 24px; margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,.05); transition: box-shadow .2s;
}
.info-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.1); }
.info-card h3 { color: #2c3e50; margin-bottom: 10px; font-size: 17px; }
.info-card p { color: #666; font-size: 14px; line-height: 1.7; }
.info-meta { display: flex; gap: 16px; margin-top: 12px; font-size: 12px; color: #aaa; }
.tag {
    display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 12px;
    background: #e3f2fd; color: #1565C0; margin-right: 6px;
}

/* ========== 商品详情扩展样式 ========== */
.product-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.product-spec {
    font-size: 12px;
    color: #888;
    margin-bottom: 4px;
}
.product-supplier {
    font-size: 11px;
    color: #aaa;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========== 行动按钮样式 ==========
.product-actions {
    display: flex;
    gap: 8px;
}
.btn-online {
    flex: 1;
    background: #ff7043;
    color: #fff;
    border: none;
    padding: 8px 0;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: background .2s;
}
.btn-online:hover {
    background: #f4511e;
}
.btn-pickup {
    flex: 1;
    background: #4A90D9;
    color: #fff;
    border: none;
    padding: 8px 0;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: background .2s;
}
.btn-pickup:hover {
    background: #1565C0;
}

/* ========== 分类展示区 ========== */
.category-section {
    padding: 20px 0 40px;
}
.category-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
}
.category-item {
    background: #fff;
    border-radius: 8px;
    padding: 20px 10px;
    text-align: center;
    transition: all .2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.category-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(0,0,0,.1);
    color: #ff7043;
}
.cat-icon {
    font-size: 32px;
}
.cat-name {
    font-size: 13px;
    color: #555;
}
.category-item:hover .cat-name {
    color: #ff7043;
}

/* ========== 促销商品 ========== */
.promo-section {
    padding: 20px 0 50px;
}
.promo-item {
    position: relative;
}
.promo-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #ff7043;
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    z-index: 1;
}

/* ========== 分类展示区 ========== */
/* ========== 模态弹窗 ========== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}
.modal-content {
    background: #fff;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
}
.modal-header h3 {
    font-size: 18px;
    color: #333;
}
.close {
    font-size: 28px;
    cursor: pointer;
    color: #999;
    line-height: 1;
}
.close:hover {
    color: #333;
}
.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}
.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}
.btn-primary {
    background: #ff7043;
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background .2s;
}
.btn-primary:hover {
    background: #f4511e;
}
.btn-secondary {
    background: #4A90D9;
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background .2s;
}
.btn-secondary:hover {
    background: #1565C0;
}
.btn-outline {
    background: #fff;
    color: #666;
    border: 1px solid #ddd;
    padding: 10px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all .2s;
}
.btn-outline:hover {
    border-color: #4A90D9;
    color: #4A90D9;
}

/* ========== 模态弹窗通用 ========== */

/* ========== Toast 提示 ========== */

/* ========== Toast 提示 ========== */
/* ========== Toast 提示 ========== */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(.8);
    background: rgba(0,0,0,.75);
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 3000;
    opacity: 0;
    transition: all .3s;
}
.toast.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* ========== 空状态提示 ========== */
.empty-tip {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 14px;
    grid-column: 1 / -1;
}

/* ========== 响应式调整 ========== */
@media (max-width: 992px) {
    .category-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 768px) {
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .modal-footer {
        flex-direction: column;
    }
    .modal-footer button {
        width: 100%;
    }
}
@media (max-width: 480px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .product-actions {
        flex-direction: column;
    }
}
