/******************************/
/*   药品网络交易平台 自定义样式   */
/******************************/

/* ---- 首屏 Header 副标题 ---- */
.header h2 {
	margin-bottom: 1rem;
	color: #dfe5ec;
	font: 700 1.75rem/2.125rem "Montserrat", sans-serif;
}

/* ---- 分类筛选按钮 ---- */
.product-filters {
    margin-bottom: 2.5rem;
    text-align: center;
}

.product-filters .filter-btn {
    display: inline-block;
    margin: 0 0.375rem 0.625rem 0.375rem;
    padding: 0.5rem 1.375rem;
    border: 1px solid #d6d3d3;
    border-radius: 1.5rem;
    background-color: #fff;
    color: #787976;
    font: 700 0.75rem/1rem "Montserrat", sans-serif;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.product-filters .filter-btn:hover {
    border-color: #14bf98;
    color: #14bf98;
}

.product-filters .filter-btn.is-checked {
    border-color: #14bf98;
    background-color: #14bf98;
    color: #fff;
}

/* ---- 药品卡片图片区 ---- */
.product-card-image {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 12.5rem;
    border-top-left-radius: 0.375rem;
    border-top-right-radius: 0.375rem;
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.4) 0%, transparent 45%),
        radial-gradient(circle at 85% 75%, rgba(20, 191, 152, 0.14) 0%, transparent 50%),
        linear-gradient(135deg, #e8f7f2 0%, #cdeedd 50%, #b8e6d4 100%);
}

.product-card-image .product-icon {
    display: block;
    width: 5.5rem;
    height: 5.5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.78);
    color: #14bf98;
    font-size: 2.6rem;
    line-height: 5.5rem;
    text-align: center;
    box-shadow: 0 0.375rem 1rem rgba(20, 191, 152, 0.16);
}

/* ---- 药品标签(OTC / 处方药 / 器械 / 保健) ---- */
.product-tag {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.25rem 0.625rem;
    border-radius: 0.25rem;
    color: #fff;
    font: 700 0.6875rem/1rem "Montserrat", sans-serif;
    letter-spacing: 0.05rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.product-tag.tag-otc { background-color: #14bf98; }
.product-tag.tag-rx { background-color: #e74c3c; }
.product-tag.tag-device { background-color: #3498db; }
.product-tag.tag-health { background-color: #f39c12; }

/* ---- 药品卡片文字 ---- */
.cards-2 .product-spec {
    margin-bottom: 0.5rem;
    color: #787976;
    font-size: 0.875rem;
    text-align: center;
}

.cards-2 .product-price {
    margin-bottom: 0.25rem;
    color: #484a46;
    font: 700 1.125rem/1.5rem "Montserrat", sans-serif;
    text-align: center;
}

.cards-2 .product-price span {
    color: #14bf98;
    font-size: 1.375rem;
}

/* ---- 药品详情灯箱 ---- */
.product-detail { padding: 0 0.5rem; }

.product-detail .detail-title {
    margin-bottom: 1.25rem;
    color: #484a46;
    font: 700 1.5rem/2rem "Montserrat", sans-serif;
    text-align: center;
}

.product-detail .detail-icon {
    display: block;
    margin: 0 auto 1.5rem auto;
    width: 5.5rem;
    height: 5.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #e8f7f2 0%, #cdeedd 100%);
    color: #14bf98;
    font-size: 2.5rem;
    line-height: 5.5rem;
    text-align: center;
}

.product-meta {
    width: 100%;
    margin-bottom: 1.25rem;
    border: 1px solid #ebe8e8;
    border-radius: 0.375rem;
    font-size: 0.9375rem;
}

.product-meta td {
    padding: 0.625rem 1rem;
    border-bottom: 1px solid #f2f0f0;
    vertical-align: top;
}

.product-meta tr:last-child td { border-bottom: none; }

.product-meta td:first-child {
    width: 7rem;
    color: #484a46;
    font-weight: 700;
    background-color: #fbfbfb;
}

.notice-box {
    margin: 1rem 0 1.5rem 0;
    padding: 0.875rem 1.125rem;
    border-left: 0.25rem solid #f39c12;
    border-radius: 0.25rem;
    background-color: #fef9ef;
    color: #8a6d3b;
    font-size: 0.875rem;
    line-height: 1.5rem;
}

.rx-tip {
    margin-bottom: 1.25rem;
    padding: 0.875rem 1.125rem;
    border-left: 0.25rem solid #e74c3c;
    border-radius: 0.25rem;
    background-color: #fdf0ef;
    color: #a94442;
    font-size: 0.875rem;
    line-height: 1.5rem;
}

/* ---- 资质公示 ---- */
.qualification-box {
    margin-bottom: 1.25rem;
    padding: 1.25rem 1.5rem;
    border: 1px solid #ebe8e8;
    border-radius: 0.375rem;
    background-color: #fbfbfb;
}

.qualification-box h4 {
    margin-bottom: 0.75rem;
    color: #14bf98;
    font: 700 1rem/1.5rem "Montserrat", sans-serif;
}

.qualification-box p {
    margin-bottom: 0.375rem;
    font-size: 0.9375rem;
    line-height: 1.625rem;
}

.placeholder-tip {
    padding: 0.625rem 0.875rem;
    border-radius: 0.25rem;
    background-color: #fff8e6;
    color: #b08a3e;
    font-size: 0.8125rem;
    line-height: 1.375rem;
}

/* ---- 制度公示卡片 ---- */
.cards-1 .card { margin-bottom: 1.5rem; }

/* ---- 页脚 ---- */
.footer-note {
    margin-top: 0.75rem;
    color: #9aa7af;
    font-size: 0.8125rem;
    line-height: 1.5rem;
}

.footer .footer-links a {
    color: #dfe5ec;
    text-decoration: none;
    font-size: 0.875rem;
}

.footer .footer-links a:hover { color: #14bf98; }

/* ---- 表单说明文字 ---- */
.form-note {
    margin-bottom: 2rem;
    color: #787976;
    font-size: 0.875rem;
    text-align: center;
}

/* ---- 灯箱正文排版 ---- */
.lightbox-text {
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.lightbox-text h3 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    color: #484a46;
}

.lightbox-text p {
    margin-bottom: 0.625rem;
    font-size: 0.9375rem;
    line-height: 1.75rem;
    text-align: justify;
}

/* ============================================
   视觉与性能优化(本地字体栈,替代 Google Fonts)
   ============================================ */

/* ---- 本地字体栈 ---- */
body, p, a, li, td, input, textarea, select, button, label, .p-large, .p-small {
    font-family: "Open Sans", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", sans-serif;
}

h1, h2, h3, h4, h5, h6, .navbar-brand, .card-title, .product-price,
.detail-title, .product-tag, .filter-btn, .btn-solid-lg, .btn-solid-reg,
.btn-outline-lg, .btn-outline-reg {
    font-family: "Montserrat", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", sans-serif;
}

/* ---- 首屏文字可读性 ---- */
.header h1, .header h2, .header .p-large {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

/* ---- 药品卡片悬停效果 ---- */
.cards-2 .card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.cards-2 .card:hover {
    transform: translateY(-0.375rem);
    box-shadow: 0 0.875rem 2rem rgba(72, 74, 70, 0.08);
}

/* ---- 按钮立体感 ---- */
.btn-solid-lg, .btn-solid-reg {
    box-shadow: 0 0.375rem 1rem rgba(20, 191, 152, 0.22);
    transition: all 0.2s;
}

.btn-solid-lg:hover, .btn-solid-reg:hover {
    box-shadow: none;
}

/* ---- 详情灯箱图标 ---- */
.product-detail .detail-icon {
    box-shadow: 0 0.5rem 1.25rem rgba(20, 191, 152, 0.18);
}

/* ---- 尊重系统减弱动效设置 ---- */
@media (prefers-reduced-motion: reduce) {
    .cards-2 .card {
        transition: none;
        transform: none;
    }
}

/* ---- 返回顶部按钮:纯 CSS 图标替代图片 ---- */
a.back-to-top {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #14bf98;
    background-image: none;
    text-indent: 0;
    font-size: 0;
}

a.back-to-top::after {
    content: "\f077";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    color: #fff;
    font-size: 1rem;
    line-height: 1;
}
