/* ============================================
   产品展示页面样式
   ============================================ */

/* ---------- 产品页面顶部 ---------- */
.products-hero {
    padding: 160px 0 60px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    text-align: center;
    color: var(--white);
}
.products-hero .section-tag {
    color: var(--gold);
}
.products-hero h1 {
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 700;
    margin: 16px 0 12px;
    letter-spacing: 4px;
}
.products-hero p {
    font-size: 16px;
    color: rgba(255,255,255,.7);
    letter-spacing: 1px;
}

/* ---------- 分类筛选 ---------- */
.products-filter {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 0;
    position: sticky;
    top: 70px;
    z-index: 90;
}
.filter-tabs {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding: 16px 0;
    -webkit-overflow-scrolling: touch;
}
.filter-tabs::-webkit-scrollbar { display: none; }
.filter-tab {
    flex-shrink: 0;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-500);
    border-radius: 50px;
    transition: all .25s ease;
    white-space: nowrap;
    border: 1px solid transparent;
}
.filter-tab:hover {
    color: var(--primary);
    background: var(--off-white);
}
.filter-tab.active {
    color: var(--white);
    background: var(--primary);
    border-color: var(--primary);
}

/* ---------- 产品网格（横向卡片） ---------- */
.products-list {
    padding: 48px 0 80px;
    min-height: 50vh;
}
.products-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.product-card {
    display: flex;
    flex-direction: row;
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--gray-200);
    cursor: pointer;
    transition: all .3s ease;
}
.product-card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,.1);
    border-color: var(--gold);
    transform: translateY(-2px);
}

/* 卡片图片 */
.product-card-img {
    flex-shrink: 0;
    width: 260px;
    height: 200px;
    overflow: hidden;
    background: var(--gray-100);
}
.product-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}
.product-card:hover .product-card-img img {
    transform: scale(1.05);
}
.product-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-300);
}

/* 卡片内容 */
.product-card-body {
    flex: 1;
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}
.product-card-cat {
    font-size: 12px;
    font-weight: 600;
    color: var(--gold);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.product-card-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
    letter-spacing: 1px;
}
.product-card-summary {
    font-size: 14px;
    color: var(--gray-500);
    line-height: 1.7;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-card-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.tag {
    display: inline-block;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 500;
    color: var(--primary);
    background: rgba(11,61,145,.08);
    border-radius: 50px;
    letter-spacing: .5px;
}
.product-card-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--gold);
    letter-spacing: .5px;
    margin-top: auto;
}

/* ---------- 产品弹窗 ---------- */
.product-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 20px;
    overflow-y: auto;
}
.product-modal.open {
    display: flex;
}
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    backdrop-filter: blur(4px);
}
.modal-content {
    position: relative;
    width: 100%;
    max-width: 860px;
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
    z-index: 1;
    animation: modalIn .3s ease;
}
@keyframes modalIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background: rgba(0,0,0,.5);
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
    line-height: 1;
}
.modal-close:hover { background: rgba(0,0,0,.8); }
.modal-body { padding: 0; }

/* 弹窗内部 */
.modal-header-img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
}
.modal-info {
    padding: 32px 36px;
}
.modal-cat {
    font-size: 12px;
    font-weight: 600;
    color: var(--gold);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.modal-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
    letter-spacing: 2px;
}
.modal-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.modal-summary {
    font-size: 15px;
    color: var(--gray-700);
    line-height: 1.8;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--gray-200);
}
.modal-content-body {
    font-size: 15px;
    color: var(--gray-700);
    line-height: 1.9;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.modal-content-body img {
    max-width: 100%;
    border-radius: 8px;
    margin: 16px 0;
    height: auto;
}
.modal-content-body h1,
.modal-content-body h2,
.modal-content-body h3,
.modal-content-body h4,
.modal-content-body h5,
.modal-content-body h6 {
    color: var(--primary);
    margin: 24px 0 12px;
    line-height: 1.4;
}
.modal-content-body h1 { font-size: 28px; }
.modal-content-body h2 { font-size: 24px; }
.modal-content-body h3 { font-size: 20px; }
.modal-content-body h4 { font-size: 18px; }
.modal-content-body h5 { font-size: 16px; }
.modal-content-body h6 { font-size: 15px; }
.modal-content-body p {
    margin-bottom: 16px;
}
.modal-content-body strong,
.modal-content-body b {
    font-weight: 700;
    color: var(--gray-900);
}
.modal-content-body em,
.modal-content-body i {
    font-style: italic;
}
.modal-content-body u {
    text-decoration: underline;
}
.modal-content-body s,
.modal-content-body strike {
    text-decoration: line-through;
}
.modal-content-body a {
    color: var(--gold);
    text-decoration: underline;
    transition: color .2s;
}
.modal-content-body a:hover {
    color: var(--gold-light);
}
.modal-content-body ul,
.modal-content-body ol {
    padding-left: 24px;
    margin-bottom: 16px;
}
.modal-content-body ul {
    list-style-type: disc;
}
.modal-content-body ol {
    list-style-type: decimal;
}
.modal-content-body li {
    margin-bottom: 8px;
    padding-left: 4px;
}
.modal-content-body blockquote {
    border-left: 4px solid var(--gold);
    padding: 12px 20px;
    margin: 16px 0;
    background: var(--off-white);
    border-radius: 0 8px 8px 0;
    color: var(--gray-600);
    font-style: italic;
}
.modal-content-body pre,
.modal-content-body code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    background: #f4f4f5;
    border-radius: 4px;
}
.modal-content-body pre {
    padding: 16px;
    margin: 16px 0;
    overflow-x: auto;
    border: 1px solid var(--gray-200);
}
.modal-content-body code {
    padding: 2px 6px;
}
.modal-content-body pre code {
    padding: 0;
    background: none;
}
.modal-content-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
}
.modal-content-body table th,
.modal-content-body table td {
    border: 1px solid var(--gray-200);
    padding: 10px 14px;
    text-align: left;
}
.modal-content-body table th {
    background: var(--off-white);
    font-weight: 600;
    color: var(--primary);
}
.modal-content-body hr {
    border: none;
    border-top: 1px solid var(--gray-200);
    margin: 24px 0;
}
/* Quill 特殊类 */
.modal-content-body .ql-align-center {
    text-align: center;
}
.modal-content-body .ql-align-right {
    text-align: right;
}
.modal-content-body .ql-align-justify {
    text-align: justify;
}
.modal-content-body .ql-indent-1 { padding-left: 2em; }
.modal-content-body .ql-indent-2 { padding-left: 4em; }
.modal-content-body .ql-indent-3 { padding-left: 6em; }
.modal-content-body .ql-indent-4 { padding-left: 8em; }
.modal-content-body .ql-indent-5 { padding-left: 10em; }
.modal-content-body .ql-indent-6 { padding-left: 12em; }
.modal-content-body .ql-indent-7 { padding-left: 14em; }
.modal-content-body .ql-indent-8 { padding-left: 16em; }
.modal-content-body .ql-video {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 8px;
    margin: 16px 0;
}

/* 弹窗图库 */
.modal-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}
.modal-gallery img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform .2s;
}
.modal-gallery img:hover { transform: scale(1.03); }

/* 弹窗视频 */
.modal-video {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 24px;
}

/* ---------- 空状态 ---------- */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--gray-300);
}
.empty-state h3 {
    font-size: 20px;
    color: var(--gray-500);
    margin: 20px 0 8px;
}
.empty-state p {
    font-size: 14px;
    color: var(--gray-500);
}

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
    .product-card {
        flex-direction: column;
    }
    .product-card-img {
        width: 100%;
        height: 200px;
    }
    .products-hero { padding: 130px 0 40px; }
    .products-filter { top: 60px; }
    .modal-content { border-radius: 12px; }
    .modal-info { padding: 24px 20px; }
    .modal-title { font-size: 22px; }
    .modal-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}
