/* 服务的产品 - 药品/器械列表 */

/* Banner 左侧说明 */
.served-products-hero {
    position: relative;
}

.sp-hero-notice {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    max-width: 300px;
    text-align: left;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.sp-hero-notice p {
    margin: 0;
    font-size: 11px;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.92);
}

.sp-hero-notice p + p {
    margin-top: 4px;
}

@media (min-width: 1200px) {
    .sp-hero-notice {
        left: max(24px, calc((100% - 1200px) / 2 + 24px));
    }
}

@media (max-width: 768px) {
    .sp-hero-notice {
        left: 16px;
        right: 16px;
        max-width: none;
        top: auto;
        bottom: 16px;
        transform: none;
    }
}

.served-products-section {
    padding-top: 48px;
    padding-bottom: 80px;
}

.sp-page-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.sp-page-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary-blue, #0052d9);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.sp-page-heading h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-blue, #0052d9);
    margin: 0;
}

.sp-heading-line {
    height: 1px;
    background: #e5e8ef;
    margin-bottom: 40px;
}

.sp-empty {
    text-align: center;
    color: #999;
    padding: 60px 0;
}

.sp-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

@media (max-width: 992px) {
    .sp-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .sp-grid {
        grid-template-columns: 1fr;
    }
}

.sp-card {
    position: relative;
    height: 100%;
}

.sp-card-inner {
    position: relative;
    background: #fff;
    border: 1px solid #eef0f4;
    overflow: hidden;
    height: 100%;
    min-height: 420px;
    display: flex;
    flex-direction: column;
}

.sp-card-cover {
    background: #e8eaef;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    flex-shrink: 0;
}

.sp-card-cover img {
    max-width: 100%;
    max-height: 160px;
    object-fit: contain;
}

.sp-card-body {
    padding: 18px 20px 22px;
    flex: 1;
}

.sp-field.sp-trade {
    font-size: 13px;
    color: #888;
    margin: 0 0 6px;
}

.sp-generic {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 12px;
    line-height: 1.4;
}

.sp-meta {
    font-size: 12px;
    color: #666;
    margin: 0 0 6px;
    line-height: 1.5;
}

.sp-meta span {
    color: #999;
    margin-right: 6px;
}

/* Hover 蓝色层 */
.sp-card-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    top: 0;
    background: linear-gradient(180deg, #0d3d7a 0%, #0a2f5e 100%);
    color: #fff;
    padding: 22px 20px 18px;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 2;
    pointer-events: none;
}

.sp-card:hover .sp-card-overlay,
.sp-card.is-expanded .sp-card-overlay {
    transform: translateY(0);
    pointer-events: auto;
}

.sp-overlay-trade {
    font-size: 13px;
    color: #fff;
    opacity: 0.85;
    margin: 0 0 4px;
}

.sp-overlay-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1.35;
}

.sp-overlay-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.35);
    margin: 12px 0;
    flex-shrink: 0;
}

.sp-overlay-content {
    flex: 1;
    overflow-y: auto;
    font-size: 12px;
    line-height: 1.65;
    margin-bottom: 10px;
    padding-right: 4px;
    color: #fff;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.4) transparent;
}

/* 富文本来自后台，覆盖 Quill 默认深色 */
.sp-overlay-content,
.sp-overlay-content p,
.sp-overlay-content li,
.sp-overlay-content span,
.sp-overlay-content div,
.sp-overlay-content strong,
.sp-overlay-content em,
.sp-overlay-content h1,
.sp-overlay-content h2,
.sp-overlay-content h3,
.sp-overlay-content h4 {
    color: #fff !important;
}

.sp-overlay-content a {
    color: #fff !important;
    text-decoration: underline;
}

.sp-overlay-content::-webkit-scrollbar {
    width: 4px;
}

.sp-overlay-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.45);
    border-radius: 2px;
}

.sp-overlay-content p {
    margin: 0 0 8px;
}

.sp-overlay-content.ql-editor {
    padding: 0;
}

.sp-overlay-content ul,
.sp-overlay-content ol {
    margin: 0 0 8px;
    padding-left: 1.2em;
}

.sp-overlay-disclaimer {
    font-size: 11px;
    color: #fff;
    opacity: 0.75;
    margin: 0 0 12px;
    flex-shrink: 0;
}

.sp-overlay-action {
    position: relative;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    align-self: flex-start;
}

.sp-btn-plus {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.9);
    background: transparent;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.25s ease, transform 0.25s ease;
    position: absolute;
    left: 0;
    bottom: 0;
    z-index: 2;
}

.sp-btn-manual {
    position: absolute;
    left: 0;
    bottom: 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    background: #0a2f5e;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(6px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    white-space: nowrap;
    z-index: 3;
}

/* 悬停加号或说明书按钮时：隐藏加号、显示说明书（仅按钮区域触发） */
.sp-overlay-action:has(.sp-btn-plus:hover) .sp-btn-plus,
.sp-overlay-action:has(.sp-btn-manual:hover) .sp-btn-plus,
.sp-overlay-action:has(.sp-btn-manual:focus-visible) .sp-btn-plus {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.sp-overlay-action:has(.sp-btn-plus:hover) .sp-btn-manual,
.sp-overlay-action:has(.sp-btn-manual:hover) .sp-btn-manual,
.sp-overlay-action:has(.sp-btn-manual:focus-visible) .sp-btn-manual {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

/* 弹窗 */
.sp-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.sp-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.sp-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.sp-modal-dialog {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.sp-verify-dialog {
    width: 100%;
    max-width: 400px;
    padding: 36px 32px 28px;
    text-align: center;
}

.sp-verify-icon {
    font-size: 48px;
    color: #8a9199;
    margin-bottom: 20px;
}

.sp-verify-main {
    font-size: 15px;
    color: #333;
    margin: 0 0 8px;
    font-weight: 500;
}

.sp-verify-sub {
    font-size: 13px;
    color: #888;
    margin: 0 0 24px;
}

.sp-verify-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sp-btn-cancel {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 4px;
    background: #e8eaef;
    color: #333;
    font-size: 15px;
    cursor: pointer;
}

.sp-btn-confirm {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 4px;
    background: #0a2f5e;
    color: #fff;
    font-size: 15px;
    cursor: pointer;
}

.sp-pdf-dialog {
    width: 100%;
    max-width: 900px;
    height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sp-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    cursor: pointer;
    font-size: 16px;
}

#spPdfFrame {
    width: 100%;
    height: 100%;
    border: none;
    flex: 1;
}

@media (hover: none) {
    .sp-card-overlay {
        pointer-events: auto;
    }
}
