/* ===== 产品详情页面样式（新版 - 参考华联机械） ===== */

/* ===== 面包屑 ===== */
.breadcrumb-wrapper {
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
    padding: 15px 0;
}

.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.breadcrumb-nav a {
    color: #666;
    transition: color 0.3s ease;
}

.breadcrumb-nav a:hover {
    color: #e94560;
}

.breadcrumb-nav span {
    color: #999;
}

.breadcrumb-nav .current {
    color: #1a1a2e;
    font-weight: 500;
}

/* ===== 产品详情区 ===== */
.product-detail-section {
    padding: 40px 0 60px;
    background: #fff;
}

.product-title {
    font-size: 1.8rem;
    color: #1a1a2e;
    margin-bottom: 30px;
    font-weight: 600;
}

/* ===== 产品信息布局 ===== */
.product-info-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-bottom: 40px;
}

/* ===== 图片画廊 - 华联风格 ===== */
.product-gallery {
    background: #fff;
    border: none;
}

/* 主图 - 正方形，仿华联 */
.product-gallery-main {
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* 1:1 正方形 */
    overflow: hidden;
    background: #fff;
    border: 1px solid #ddd;
    cursor: pointer;
}

.product-gallery-main img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #f8f9fa;
}

/* 视频播放图标（第一个主图/视频） */
.product-gallery-main .video-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    pointer-events: none;
}

.product-gallery-main .video-icon i {
    color: #fff;
    font-size: 1.5rem;
    margin-left: 4px;
}

/* 缩略图列表 */
.thumbnail-list {
    display: flex;
    gap: 4px;
    padding: 10px 0;
    overflow-x: auto;
}

.thumb-item {
    width: 70px;
    height: 70px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid #ddd;
    transition: border-color 0.3s ease;
    flex-shrink: 0;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.thumb-item:hover {
    border-color: #e94560;
}

.thumb-item.active {
    border-color: #e94560;
}

.thumb-item img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* 缩略图上的视频小图标 */
.thumb-item .thumb-video-icon {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thumb-item .thumb-video-icon i {
    color: #fff;
    font-size: 0.55rem;
    margin-left: 1px;
}

/* ===== 产品信息面板 ===== */
.product-info-panel {
    padding: 20px 0;
}

.info-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.info-item label {
    width: 80px;
    font-weight: 600;
    color: #666;
}

.info-item span {
    flex: 1;
    color: #1a1a2e;
}

/* ===== 产品操作区 ===== */
.product-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.quantity-selector label {
    font-weight: 600;
    color: #666;
}

.quantity-input {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.quantity-input button {
    width: 40px;
    height: 40px;
    border: none;
    background: #f8f9fa;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background 0.3s ease;
}

.quantity-input button:hover {
    background: #e8e8e8;
}

.quantity-input input {
    width: 60px;
    height: 40px;
    border: none;
    text-align: center;
    font-size: 1rem;
    -moz-appearance: textfield;
}

.quantity-input input::-webkit-outer-spin-button,
.quantity-input input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.btn-inquiry-large,
.btn-add-cart {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-inquiry-large {
    background: #e94560;
    color: #fff;
    margin-bottom: 10px;
}

.btn-inquiry-large:hover {
    background: #d63d56;
}

.btn-add-cart {
    background: #fff;
    color: #e94560;
    border: 2px solid #e94560;
}

.btn-add-cart:hover {
    background: #e94560;
    color: #fff;
}

/* ===== 上下布局 ===== */
.product-vertical-layout {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 40px;
}

.section-top,
.section-middle,
.section-bottom {
    background: #fff;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

.section-title {
    font-size: 1.2rem;
    color: #1a1a2e;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e94560;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    justify-content: flex-start;
}

.section-title i {
    color: #e94560;
}

.section-content {
    line-height: 1.8;
    color: #666;
}

/* 细节图片区域 */
.detail-images {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.detail-images img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
    aspect-ratio: 4/3;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.detail-images img:hover {
    transform: scale(1.05);
}

/* ===== 参数表格 ===== */
.params-table {
    width: 100%;
    border-collapse: collapse;
}

.params-table tr {
    border-bottom: 1px solid #f0f0f0;
}

.params-table td {
    padding: 12px 15px;
    color: #444;
}

.params-table td:first-child {
    width: 200px;
    font-weight: 600;
    color: #666;
    background: #f8f9fa;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .detail-images {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .params-table td:first-child {
        width: 120px;
    }
}

/* ===== 产品导航 ===== */
.product-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.nav-prev,
.nav-next {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    transition: color 0.3s ease;
}

.nav-prev:hover,
.nav-next:hover {
    color: #e94560;
}

/* ===== 精选推荐 ===== */
.recommended-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid #f0f0f0;
}

.recommended-section .section-title {
    font-size: 1.5rem;
    color: #1a1a2e;
    margin-bottom: 30px;
    font-weight: 600;
}

.recommended-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* ===== 响应式 ===== */
@media (max-width: 992px) {
    .product-info-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .recommended-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .product-detail-section {
        padding: 20px 0 40px;
    }
    
    .product-title {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }
    
    .product-info-panel {
        padding: 10px 0;
    }
    
    .recommended-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .thumbnail-list {
        gap: 4px;
    }
    
    .thumb-item {
        width: 55px;
        height: 55px;
    }
}

@media (max-width: 576px) {
    .product-title {
        font-size: 1.2rem;
    }
    
    .tab-btn {
        padding: 10px 15px;
        font-size: 0.85rem;
    }
    
    .tab-headers {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .recommended-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .params-table td:first-child {
        width: 100px;
        font-size: 0.85rem;
    }
    
    .params-table td {
        padding: 8px 10px;
        font-size: 0.85rem;
    }
    
    .product-gallery-main .video-icon {
        width: 36px;
        height: 36px;
    }
    
    .product-gallery-main .video-icon i {
        font-size: 0.9rem;
    }
    
    .thumb-item {
        width: 45px;
        height: 45px;
    }
    
    .btn-inquiry-large, .btn-add-cart {
        padding: 12px;
        font-size: 0.9rem;
    }
}
/* ===== PHP 版产品详情页样式 (2026-08-09 修复: PHP模板类名与CSS不匹配导致无样式) =====
   PHP 模板 (product-detail.php) 用 .product-detail/.product-content/.product-tabs
   而 CSS 原定义为 .product-detail-section/.product-info-layout/.product-vertical-layout
   以下补齐 PHP 版类名, 复用原有设计
*/
.product-detail {
    padding: 40px 0 60px;
    background: #fff;
}
.product-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-bottom: 40px;
}
/* 主图容器: 复用 .product-gallery-main 已有样式(正方形contain), 这里只兜底 */
.product-gallery {
    background: #fff;
}
/* 信息面板 */
.product-info-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.info-item {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: 15px;
    color: #333;
}
.info-item label {
    color: #999;
    min-width: 70px;
    font-weight: 600;
}
.info-item span {
    color: #1a1a2e;
    font-weight: 500;
}
.product-actions {
    display: flex;
    gap: 12px;
    margin-top: 10px;
    flex-wrap: wrap;
}
.product-actions .btn-inquiry {
    background: #e94560;
    color: #fff;
    padding: 10px 24px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}
.product-actions .btn-inquiry:hover { background: #d63852; }
.product-actions .btn-phone {
    background: #1e3c72;
    color: #fff;
    padding: 10px 24px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}
.product-actions .btn-phone:hover { background: #2a5298; }
/* Tab 区 */
.product-tabs {
    margin-top: 20px;
}
.tab-buttons {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e94560;
    margin-bottom: 20px;
}
.tab-btn {
    padding: 12px 28px;
    background: #f5f7fa;
    border: 1px solid #e0e0e0;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    cursor: pointer;
    font-size: 15px;
    color: #666;
    margin-right: 4px;
    transition: all 0.2s;
}
.tab-btn.active {
    background: #e94560;
    color: #fff;
    border-color: #e94560;
    font-weight: 600;
}
.tab-panel {
    display: none;
    padding: 20px 0;
    line-height: 1.8;
    color: #444;
}
.tab-panel.active {
    display: block;
}
.tab-panel .section-content p { margin-bottom: 10px; }
/* 参数表 */
.params-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}
.params-table td {
    padding: 10px 15px;
    border: 1px solid #e0e0e0;
    font-size: 14px;
}
.params-table tr:nth-child(odd) td { background: #fafbfc; }
.params-table td:first-child {
    width: 30%;
    color: #666;
    font-weight: 600;
    background: #f5f7fa !important;
}
/* 细节图片 */
.detail-images {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}
.detail-images img {
    max-width: 100%;
    border-radius: 4px;
}
/* 响应式 */
@media (max-width: 768px) {
    .product-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .tab-btn { padding: 10px 14px; font-size: 14px; }
}
/* ===== 精选推荐卡片样式 (2026-08-09 修复: 原CSS无.recommended-img定义, 图片大小不一) ===== */
.recommended-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #eee;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}
.recommended-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}
.recommended-card a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.recommended-img {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f8f9fa;
    flex-shrink: 0;
}
.recommended-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
    box-sizing: border-box;
    display: block;
}
.recommended-card h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0;
    padding: 12px 14px;
    line-height: 1.4;
    min-height: 60px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
