/* 国力化工 - 产品详情页专属样式 */
/* 从 template/cms/default/product.html 提取 */

/* 页面布局 */
.product-detail-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
}

/* 侧边栏 */
.product-sidebar {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.sidebar-block {
    background: rgba(26, 26, 46, 0.8);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 15px rgba(0,0,0,.3);
}

.sidebar-title {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: var(--primary);
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-title i {
    color: #fff;
}

.faq-sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.faq-sidebar-list li {
    margin-bottom: 10px;
}

.faq-sidebar-list li:last-child {
    margin-bottom: 0;
}

.faq-sidebar-list a {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    background: var(--bg-light);
    border-radius: 8px;
    color: var(--text-dark);
    font-size: 13px;
    line-height: 1.5;
    transition: all 0.3s;
}

.faq-sidebar-list a:hover {
    background: var(--primary);
    color: #fff;
    transform: translateX(5px);
}

.faq-sidebar-list a i {
    color: var(--primary);
    margin-top: 3px;
    flex-shrink: 0;
}

.faq-sidebar-list a:hover i {
    color: #fff;
}

.faq-sidebar-list a span {
    overflow: hidden;
    text-overflow: -o-ellipsis-lastline;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.contact-info p {
    font-size: 14px;
    color: var(--text-dark);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact-info p i {
    color: var(--primary);
    width: 16px;
}

.weixin-qrcode {
    margin-top: 10px !important;
    display: none;
}

.contact-info:hover .weixin-qrcode {
    display: block;
}

.contact-btn {
    display: block;
    text-align: center;
    padding: 12px;
    background: var(--primary);
    color: #fff;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    margin-top: 15px;
    transition: all 0.3s;
}

.contact-btn:hover {
    background: var(--primary-dark);
    color: #fff;
    transform: translateY(-2px);
}

/* 主内容区 */
.product-main {
    min-width: 0;
}

/* 产品卡片 */
.product-card {
    background: rgba(26, 26, 46, 0.8);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 5px 25px rgba(0,0,0,.3);
    margin-bottom: 30px;
}

.product-card-header {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
}

.product-image {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-light);
}

.product-image img {
    width: 100%;
    height: auto;
    display: block;
}

.product-basic-info {
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 28px;
    color: var(--text-dark);
    margin-bottom: 15px;
    line-height: 1.3;
}

.product-brief {
    font-size: 15px;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 20px;
}

.param-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.param-item {
    background: var(--bg-light);
    padding: 12px 15px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.param-label {
    font-size: 13px;
    color: var(--text-light);
}

.param-value {
    font-size: 14px;
    color: var(--text-dark);
    font-weight: 500;
}

.price-section {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.9) 0%, rgba(26, 26, 46, 0.7) 100%);
    border: 1px solid #ffd966;
    border-radius: 10px;
    padding: 15px 18px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-display {
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-label {
    font-size: 14px;
    color: var(--text-light);
}

.price-value {
    font-size: 22px;
    font-weight: 700;
    color: #e67e22;
}

.price-unknown {
    color: #999;
    font-size: 20px;
}

.price-update-time {
    font-size: 13px;
    color: #999;
    display: flex;
    align-items: center;
    gap: 5px;
}

.price-update-time i {
    color: #999;
}

.doc-downloads {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.doc-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(26, 26, 46, 0.8);
    border: 2px solid var(--primary);
    border-radius: 8px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s;
}

.doc-btn:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,102,204,0.2);
}

.doc-btn i {
    font-size: 16px;
}

.doc-update-time {
    font-size: 12px;
    color: #999;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
}

.doc-update-time i {
    color: #999;
}

.product-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: auto;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.action-btn.primary {
    background: var(--primary);
    color: #fff;
}

.action-btn.primary:hover {
    background: var(--primary-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,102,204,0.3);
}

.action-btn.secondary {
    background: var(--accent);
    color: #fff;
}

.action-btn.secondary:hover {
    background: #e55a00;
    color: #fff;
    transform: translateY(-2px);
}

.action-btn.contact {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.action-btn.contact:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: #fff;
    transform: translateY(-2px);
}

/* 详情标签页 */
.detail-tabs {
    background: rgba(26, 26, 46, 0.8);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 5px 25px rgba(0,0,0,.3);
    margin-bottom: 30px;
}

.detail-tab-nav {
    display: flex;
    gap: 5px;
    border-bottom: 2px solid var(--bg-light);
    margin-bottom: 25px;
}

.tab-btn {
    padding: 15px 30px;
    background: none;
    border: none;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-light);
    cursor: pointer;
    position: relative;
    transition: all 0.3s;
}

.tab-btn h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 500;
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
    opacity: 0;
    transition: opacity 0.3s;
}

.tab-btn:hover,
.tab-btn.active {
    color: var(--primary);
}

.tab-btn.active::after {
    opacity: 1;
}

.detail-tab-content {
    color: var(--text-dark);
    line-height: 1.9;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.tab-panel h2,
.tab-panel h3 {
    color: var(--text-dark);
    margin: 20px 0 15px;
}

.tab-panel img {
    max-width: 100%;
    border-radius: 10px;
    margin: 15px 0;
}

.tab-panel ul,
.tab-panel ol {
    padding-left: 25px;
}

.tab-panel li {
    margin-bottom: 8px;
}

/* 上下篇导航 */
.article-nav {
    display: flex;
    justify-content: space-between;
    background: rgba(26, 26, 46, 0.8);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,.3);
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 25px;
    color: var(--text-dark);
    font-size: 14px;
    transition: all 0.3s;
    flex: 1;
}

.nav-btn:hover {
    background: var(--bg-light);
    color: var(--primary);
}

.nav-btn.next {
    justify-content: flex-end;
    border-left: 1px solid var(--border);
}

.nav-btn span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
}

/* 相关产品网格 - 一行5个 */
.related-products-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.related-product-item {
    background: rgba(26, 26, 46, 0.8);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,.3);
    transition: all 0.3s;
}

.related-product-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0,102,204,0.15);
}

.rp-image {
    position: relative;
    height: 160px;
    overflow: hidden;
    background: var(--bg-light);
}

.rp-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.related-product-item:hover .rp-image img {
    transform: scale(1.1);
}

.rp-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,102,204,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s;
}

.rp-overlay i {
    margin-right: 8px;
}

.related-product-item:hover .rp-overlay {
    opacity: 1;
}

.rp-info {
    padding: 18px;
}

.rp-info h4 {
    font-size: 15px;
    color: var(--text-dark);
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rp-info p {
    font-size: 12px;
    color: var(--text-light);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 0;
}

.more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 35px;
    background: var(--primary);
    color: #fff;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s;
}

.more-btn:hover {
    background: var(--primary-dark);
    color: #fff;
    transform: translateY(-2px);
}

/* 标签页内容区域通用样式 */
.detail-tab-content .tab-panel > div {
    font-size: 16px;
    color: var(--text-dark);
    line-height: 1.8;
    background: rgba(26, 26, 46, 0.6);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.detail-tab-content .tab-panel p {
    margin-bottom: 18px;
    text-align: justify;
    text-indent: 2em;
}

.detail-tab-content .tab-panel p:last-child {
    margin-bottom: 0;
}

.detail-tab-content .tab-panel h2 {
    font-size: 22px;
    font-weight: bold;
    color: #ffffff;
    margin: 20px 0 18px 0;
    padding-left: 15px;
    border-left: 4px solid #3b82f6;
    background: rgba(26, 26, 46, 0.8);
    padding: 12px 18px;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.detail-tab-content .tab-panel h3 {
    font-size: 18px;
    font-weight: bold;
    color: #ffffff;
    margin: 25px 0 15px 0;
    padding-left: 15px;
    border-left: 4px solid #3b82f6;
    background: rgba(26, 26, 46, 0.8);
    padding: 10px 15px;
    border-radius: 0 6px 6px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.detail-tab-content .tab-panel h4 {
    font-size: 16px;
    font-weight: bold;
    color: #e5e5e5;
    margin: 20px 0 12px 0;
}

.detail-tab-content .tab-panel strong {
    color: #60a5fa;
    font-weight: 600;
}

.detail-tab-content .tab-panel ul {
    list-style: none;
    padding: 0;
    margin: 15px 0 20px 20px;
}

.detail-tab-content .tab-panel ul li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 12px;
    line-height: 1.7;
}

.detail-tab-content .tab-panel ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: bold;
    font-size: 14px;
}

.detail-tab-content .tab-panel ol {
    padding-left: 30px;
    margin: 15px 0 20px 0;
}

.detail-tab-content .tab-panel ol li {
    margin-bottom: 10px;
    line-height: 1.7;
}

.detail-tab-content .tab-panel table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0 20px 0;
    background: rgba(26, 26, 46, 0.8);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.detail-tab-content .tab-panel table th {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #fff;
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
}

.detail-tab-content .tab-panel table td {
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 15px;
    color: #e5e5e5;
}

.detail-tab-content .tab-panel table tr:last-child td {
    border-bottom: none;
}

.detail-tab-content .tab-panel table tr:hover td {
    background: rgba(26, 26, 46, 0.5);
}

.detail-tab-content .tab-panel blockquote {
    border-left: 4px solid #10b981;
    background: rgba(16, 185, 129, 0.1);
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
    color: #e5e5e5;
}

.detail-tab-content .tab-panel pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 18px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    line-height: 1.6;
}

.detail-tab-content .tab-panel code {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
}

.detail-tab-content .tab-panel hr {
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, #cbd5e1, transparent);
    margin: 30px 0;
}

.detail-tab-content .tab-panel img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.detail-tab-content .tab-panel table td:first-child {
    font-weight: 500;
    color: #a0aec0;
    min-width: 120px;
}

/* 响应式 */
@media (max-width: 1200px) {
    .related-products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .product-card-header {
        grid-template-columns: 250px 1fr;
    }
}

@media (max-width: 992px) {
    .product-detail-wrapper {
        grid-template-columns: 1fr;
    }
    
    .product-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .related-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .product-card-header {
        grid-template-columns: 1fr;
    }
    
    .product-image {
        max-width: 400px;
    }
}

@media (max-width: 768px) {
    .product-sidebar {
        grid-template-columns: 1fr;
    }
    
    .related-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .param-grid {
        grid-template-columns: 1fr;
    }
    
    .product-name {
        font-size: 22px;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .action-btn {
        justify-content: center;
    }
    
    .article-nav {
        flex-direction: column;
    }
    
    .nav-btn.next {
        border-left: none;
        border-top: 1px solid var(--border);
    }
    
    .detail-tab-nav {
        overflow-x: auto;
    }
}

@media (max-width: 576px) {
    .related-products-grid {
        grid-template-columns: 1fr;
    }
}
