﻿/* ==========================================
   产品详情页样式 - 现代化设计
   ========================================== */

/* ----- 面包屑导航 ----- */
.product-back-nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #8b5cf6;
}
.product-back-nav a {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #6366f1;
    text-decoration: none;
    font-weight: 500;
    transition: color .2s;
}
.product-back-nav a:hover { color: #4338ca; }
.product-back-nav svg { flex-shrink: 0; }

/* ----- 主内容区布局 ----- */
.product-detail-main {
    max-width: 1200px;
    margin: 20px auto 60px;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    align-items: start;
}

/* ----- 图库区域 ----- */
.product-gallery-wrap {
    position: sticky;
    top: 20px;
}
.gallery-main {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    background: linear-gradient(135deg, #f8f9fb, #f0f2f8);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e0e3f0;
}
.gallery-main img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity .45s ease;
    pointer-events: none;
}
.gallery-main img.active {
    opacity: 1;
    pointer-events: auto;
}
.gallery-empty {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    gap: 8px;
}
.gallery-empty svg { width: 48px; height: 48px; }

/* 画廊控制 */
.gallery-counter {
    position: absolute;
    bottom: 12px;
    left: 16px;
    background: linear-gradient(135deg, rgba(79,70,229,.8), rgba(99,102,241,.8));
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    backdrop-filter: blur(8px);
    pointer-events: none;
    letter-spacing: .5px;
}
.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, rgba(255,255,255,.9), rgba(255,255,255,.85));
    color: #4f46e5;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(79,70,229,.15);
    transition: all .25s;
    z-index: 5;
}
.gallery-arrow:hover {
    background: #fff;
    box-shadow: 0 6px 22px rgba(79,70,229,.25);
    transform: translateY(-50%) scale(1.08);
}
.gallery-arrow.prev { left: 12px; }
.gallery-arrow.next { right: 12px; }
.gallery-arrow svg {
    width: 20px; height: 20px;
    stroke: #4f46e5; stroke-width: 2.5;
    fill: none; stroke-linecap: round; stroke-linejoin: round;
}

/* 缩略图条 */
.gallery-thumb-row {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-behavior: smooth;
}
.gallery-thumb-row::-webkit-scrollbar { height: 3px; }
.gallery-thumb-row::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 2px; }
.gallery-thumb {
    flex-shrink: 0;
    width: 72px;
    height: 56px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    opacity: .55;
    transition: all .2s;
    background: #f8f9fa;
}
.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.gallery-thumb:hover { opacity: .8; }
.gallery-thumb.active {
    opacity: 1;
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99,102,241,.25);
}

/* 导航点 */
.gallery-dots {
    display: none;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
}
.gallery-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: #c7d2fe;
    cursor: pointer;
    transition: all .25s;
    padding: 0;
}
.gallery-dot.active { background: #4f46e5; width: 28px; border-radius: 4px; }

/* ----- 产品信息区 ----- */
.product-info-sidebar { padding-top: 8px; }
.product-title {
    font-size: 20px;
    font-weight: 800;
    background: linear-gradient(135deg, #1e3a8a 0%, #4f46e5 50%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.3;
    margin: 0 0 10px;
}
.product-model-tag {
    display: inline-block;
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    color: #4f46e5;
    font-size: 13px;
    font-weight: 600;
    padding: 5px 16px;
    border-radius: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(99,102,241,.2);
    letter-spacing: .5px;
}

/* 产品简述 */
.product-lead {
    font-size: 16px;
    color: #334155;
    line-height: 1.8;
    margin-bottom: 24px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-left: 4px solid #6366f1;
    border-radius: 0 10px 10px 0;
}

/* 快捷特性标签 */
.product-features-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}
.product-features-badges span {
    display: flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    color: #1d4ed8;
    font-size: 13px;
    padding: 7px 14px;
    border-radius: 20px;
    font-weight: 600;
    border: 1px solid rgba(59,130,246,.2);
    transition: all .25s;
}
.product-features-badges span:nth-child(2) {
    background: linear-gradient(135deg, #fdf2f8, #fce7f3);
    color: #be185d;
    border-color: rgba(236,72,153,.2);
}
.product-features-badges span:nth-child(3) {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    color: #15803d;
    border-color: rgba(34,197,94,.2);
}
.product-features-badges span:nth-child(4) {
    background: linear-gradient(135deg, #fefce8, #fef9c3);
    color: #a16207;
    border-color: rgba(234,179,8,.2);
}
.product-features-badges span:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
}
.product-features-badges span svg { flex-shrink: 0; }

/* 操作按钮 */
.product-actions {
    display: flex;
    gap: 8px;
}
.btn-inquiry {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px 18px;
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    transition: all .25s;
    box-shadow: 0 4px 15px rgba(79,70,229,.25);
    letter-spacing: .5px;
}
.btn-inquiry:hover {
    background: linear-gradient(135deg, #4338ca, #4f46e5);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79,70,229,.35);
}
.btn-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 11px 16px;
    background: linear-gradient(135deg, #fff, #fafafa);
    color: #4f46e5;
    font-size: 14px;
    font-weight: 600;
    border: 1.5px solid #c7d2fe;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    transition: all .25s;
}
.btn-back:hover {
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    border-color: #a5b4fc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99,102,241,.15);
}

/* 自定义链接按钮 */
.custom-link-area {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #e8e8ff;
}
.custom-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: .5px;
    transition: all .25s;
    box-shadow: 0 4px 15px rgba(16,185,129,.3);
}
.custom-link-btn:hover {
    background: linear-gradient(135deg, #059669, #047857);
    box-shadow: 0 6px 22px rgba(16,185,129,.45);
    transform: translateY(-2px);
}

/* ----- 特性展示区 ----- */
.product-features-area {
    max-width: 1200px;
    margin: 0 auto 60px;
    padding: 0 24px;
    background: linear-gradient(180deg, #fafafe 0%, transparent 100%);
    padding-top: 40px;
    padding-bottom: 40px;
    border-radius: 20px;
}
.section-heading {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}
.section-heading h2 {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, #1e3a8a, #4f46e5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 12px;
    display: inline-block;
}
.section-heading::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #6366f1, #a78bfa);
    border-radius: 2px;
    margin: 12px auto 0;
}
.section-heading p {
    font-size: 15px;
    color: #6366f1;
    margin: 0;
    font-weight: 500;
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}
.feature-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 28px 24px;
    transition: all .3s;
    position: relative;
    overflow: hidden;
}
.feature-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #e5e7eb, #e5e7eb);
    transition: background .3s;
}
.feature-card:hover {
    box-shadow: 0 12px 40px rgba(79,70,229,.1);
    transform: translateY(-4px);
    border-color: #c7d2fe;
}
.feature-card:hover::before {
    background: linear-gradient(90deg, #6366f1, #a78bfa);
}
.feature-card .f-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 16px;
    transition: transform .3s;
}
.feature-card:hover .f-icon { transform: scale(1.1); }
.feature-card:nth-child(8n+1) .f-icon { background: linear-gradient(135deg, #eef2ff, #e0e7ff); color: #4f46e5; }
.feature-card:nth-child(8n+2) .f-icon { background: linear-gradient(135deg, #fdf2f8, #fce7f3); color: #db2777; }
.feature-card:nth-child(8n+3) .f-icon { background: linear-gradient(135deg, #f0fdf4, #dcfce7); color: #16a34a; }
.feature-card:nth-child(8n+4) .f-icon { background: linear-gradient(135deg, #fff7ed, #ffedd5); color: #ea580c; }
.feature-card:nth-child(8n+5) .f-icon { background: linear-gradient(135deg, #eff6ff, #dbeafe); color: #2563eb; }
.feature-card:nth-child(8n+6) .f-icon { background: linear-gradient(135deg, #faf5ff, #f3e8ff); color: #9333ea; }
.feature-card:nth-child(8n+7) .f-icon { background: linear-gradient(135deg, #ecfdf5, #d1fae5); color: #059669; }
.feature-card:nth-child(8n+8) .f-icon { background: linear-gradient(135deg, #fef2f2, #fee2e2); color: #dc2626; }
.feature-card h3 {
    font-size: 17px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px;
}
.feature-card p {
    font-size: 14px;
    color: #64748b;
    line-height: 1.7;
    margin: 0;
}

/* ----- 规格参数 ----- */
.product-specs-area {
    max-width: 1200px;
    margin: 0 auto 60px;
    padding: 0 24px;
}
.specs-table-wrap {
    max-width: 800px;
    margin: 0 auto;
}
.specs-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(99,102,241,.08);
    border: 1px solid #e8e8ff;
}
.specs-table tr:nth-child(odd) { background: #fafafe; }
.specs-table tr:nth-child(even) { background: #fff; }
.specs-table tr { transition: background .2s; }
.specs-table tr:hover { background: #f0f0ff; }
.specs-table td {
    padding: 14px 24px;
    font-size: 14px;
    border-bottom: 1px solid #f0efff;
}
.specs-table td:first-child {
    font-weight: 700;
    color: #4f46e5;
    width: 30%;
    letter-spacing: .3px;
}
.specs-table td:last-child { color: #334155; }

/* ----- 产品描述区 ----- */
.product-desc-area {
    max-width: 1200px;
    margin: 0 auto 60px;
    padding: 0 24px;
}
.desc-content {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.9;
    color: #1e293b;
    font-size: 15px;
}
.desc-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 20px 0;
    box-shadow: 0 4px 20px rgba(79,70,229,.1);
}
.desc-content p {
    margin: 0 0 18px;
    padding: 14px 18px;
    background: linear-gradient(135deg, #fafafe 0%, #f0f4ff 100%);
    border-radius: 10px;
    border-left: 3px solid #a5b4fc;
    color: #334155;
    transition: all .25s;
}
.desc-content p:hover {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8edff 100%);
    border-left-color: #6366f1;
    transform: translateX(3px);
}
.desc-content h3 {
    font-size: 20px;
    font-weight: 800;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 32px 0 14px;
    padding-left: 16px;
    border-left: 4px solid #6366f1;
    line-height: 1.3;
}
.desc-content ul, .desc-content ol {
    padding: 16px 20px 16px 40px;
    margin: 0 0 18px;
    background: linear-gradient(135deg, #fffbf0, #fefce8);
    border: 1px solid #fde68a;
    border-radius: 12px;
}
.desc-content li {
    margin-bottom: 8px;
    color: #92400e;
}
.desc-content li::marker { color: #f59e0b; font-weight: 700; }

/* 描述内容内的规格卡片（自动格式化生成） */
.desc-spec-card {
    background: linear-gradient(135deg, #fafafe, #f0efff);
    border: 2px solid #c7d2fe;
    border-radius: 14px;
    padding: 20px 24px;
    margin: 20px 0;
    box-shadow: 0 2px 12px rgba(99,102,241,.06);
}
.desc-spec-row {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px dashed #d8d6f0;
}
.desc-spec-row:last-child { border-bottom: none; }
.desc-spec-label {
    font-weight: 700;
    color: #6d28d9;
    min-width: 120px;
    flex-shrink: 0;
    letter-spacing: .3px;
}
.desc-spec-value {
    color: #1e40af;
    flex: 1;
    font-weight: 500;
}

/* ----- 响应式 ----- */
@media (max-width: 860px) {
    .product-detail-main {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .product-gallery-wrap {
        position: static;
    }
    .product-title { font-size: 19px; }
    .gallery-thumb { width: 56px; height: 44px; }
    .gallery-arrow { width: 34px; height: 34px; }
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .section-heading h2 { font-size: 24px; }
}
@media (max-width: 480px) {
    .product-detail-main, .product-features-area, .product-specs-area, .product-desc-area {
        padding: 0 16px;
    }
    .product-back-nav { padding: 12px 16px; }
    .product-title { font-size: 18px; }
    .product-lead { padding: 12px 14px; font-size: 14px; }
    .features-grid {
        grid-template-columns: 1fr;
    }
    .gallery-thumb-row { display: none; }
    .gallery-dots { display: flex; }
    .product-actions { flex-direction: column; }
    .section-heading h2 { font-size: 21px; }
    .desc-content h3 { font-size: 17px; }
}

/* ----- 灯箱 ----- */
.lightbox-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.94);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    animation: lbFadeIn .25s ease;
}
@keyframes lbFadeIn { from { opacity: 0; } to { opacity: 1; } }
.lightbox-overlay img {
    max-width: 92vw;
    max-height: 88vh;
    object-fit: contain;
    border-radius: 6px;
    transition: opacity .15s ease;
}
.lb-close {
    position: absolute;
    top: 16px;
    right: 24px;
    font-size: 42px;
    color: #a5b4fc;
    background: rgba(0,0,0,.15);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    line-height: 1;
    z-index: 100001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
}
.lb-close:hover { background: rgba(239,68,68,.5); color: #fff; }
.lb-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 52px;
    color: #a5b4fc;
    background: rgba(0,0,0,.2);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100001;
    opacity: .8;
    transition: opacity .2s, background .2s, color .2s;
    user-select: none;
    line-height: 1;
}
.lb-nav:hover { opacity: 1; background: rgba(99,102,241,.3); color: #fff; }
.lb-prev { left: 8px; }
.lb-next { right: 8px; }
.lb-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(79,70,229,.7);
    color: #fff;
    font-size: 13px;
    letter-spacing: 1px;
    padding: 4px 16px;
    border-radius: 20px;
    font-weight: 600;
    backdrop-filter: blur(8px);
}
@media (max-width: 600px) {
    .lb-nav { font-size: 36px; padding: 14px 10px; }
}
