/* ════════════════════════════════════════════════════════════════
   犇通电气 - 产品页专用样式
   依赖：common.css（基础重置、按钮、栏目标题、导航、页脚、CSS变量）
   明亮通透风格：白底卡片 + #f8f9fa浅冷灰底色
   ════════════════════════════════════════════════════════════════ */

/* ── 一、页面横幅 ── */
.page-banner {
    position: relative;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
@media (min-width: 768px) { .page-banner { height: 280px; } }
.page-banner-bg {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}
.page-banner-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.3);
}
.page-banner-content {
    position: relative; z-index: 10;
    text-align: center; color: #fff;
}
.page-banner-title {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 700; margin-bottom: 0.5rem;
}
.page-banner-en {
    font-size: 0.875rem; opacity: 0.8;
    letter-spacing: 0.2em;
}
.page-banner-desc {
    font-size: 0.8125rem; color: #ddd;
    margin-top: 0.75rem; max-width: 48rem;
    line-height: 1.7;
}
@media (min-width: 768px) { .page-banner-desc { font-size: 0.875rem; } }

/* ── 二、面包屑 ── */
.breadcrumb {
    background: var(--card-bg);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}
.breadcrumb-inner {
    display: flex; align-items: center; gap: 0.5rem;
    font-size: 0.875rem; color: var(--text-light);
}
@media (min-width: 768px) { .breadcrumb-inner { font-size: 0.9375rem; } }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb-sep { font-size: 10px; color: #bbb; }
.breadcrumb-current { color: var(--primary); }

/* ── 三、产品列表主体 ── */
.product-body {
    padding: 2.5rem 0;
    background: var(--page-bg);
}
@media (min-width: 768px) { .product-body { padding: 4rem 0; } }

.product-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
@media (min-width: 1024px) {
    .product-layout {
        grid-template-columns: 220px 1fr;
        gap: 2rem;
    }
}

/* ── 四、侧边分类栏（PC） ── */
.product-sidebar { display: none; }
@media (min-width: 1024px) { .product-sidebar { display: block; } }

.sidebar-box {
    background: var(--card-bg);
    border-radius: 0.5rem;
    overflow: hidden;
    position: sticky;
    top: 6rem;
    border: 1px solid var(--border-color);
}
.sidebar-title {
    background: var(--primary);
    color: #fff;
    padding: 1rem;
    font-weight: 700;
    font-size: 1.125rem;
}
.sidebar-list { padding: 0.5rem 0; }

/* 侧边分类项 */
.cat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    color: var(--text-sub);
    cursor: pointer;
    transition: all 0.15s ease;
    border-left: 3px solid transparent;
}
.cat-item:hover {
    color: var(--primary);
    background-color: var(--page-bg);
    border-left-color: var(--primary);
}
.cat-item i { font-size: 0.625rem; color: var(--text-light); }
.cat-active {
    color: var(--primary) !important;
    background-color: var(--page-bg);
    border-left: 3px solid var(--primary) !important;
    font-weight: 500;
}

/* 侧边咨询卡片 */
.sidebar-consult {
    background: var(--accent-red);
    color: #fff;
    padding: 1rem;
}
.sidebar-consult p:first-child { font-size: 0.9375rem; font-weight: 500; margin-bottom: 0.25rem; }
.sidebar-consult p:nth-child(2) { font-size: 0.8125rem; opacity: 0.9; margin-bottom: 0.75rem; }
.sidebar-consult .btn-primary {
    background: #fff;
    color: var(--accent-red);
    display: block;
    text-align: center;
    width: 100%;
}
.sidebar-consult .btn-primary:hover { background: var(--page-bg); }

/* ── 五、移动端分类标签 ── */
.cat-tabs-mobile {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.cat-tabs-mobile::-webkit-scrollbar { display: none; }
@media (min-width: 1024px) { .cat-tabs-mobile { display: none; } }

.cat-tab {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    white-space: nowrap;
    border-radius: 9999px;
    transition: all 0.15s ease;
    flex-shrink: 0;
}
.cat-tab-active { background-color: var(--primary); color: #fff; }
.cat-tab-default { background-color: var(--page-bg); color: var(--text-sub); }
.cat-tab-default:hover { background-color: var(--border-color); }

/* ── 六、分类标题区 ── */
.cat-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}
.cat-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
}
@media (min-width: 768px) { .cat-header h2 { font-size: 1.5rem; } }
.cat-header-desc {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}
.cat-header-count {
    font-size: 0.8125rem;
    color: var(--text-light);
    white-space: nowrap;
}
@media (min-width: 640px) { .cat-header-count { display: block; } }
.cat-header-count .num { color: var(--accent-orange); font-weight: 500; }

/* ── 七、产品列表网格 ── */
.product-list-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}
@media (min-width: 768px) {
    .product-list-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
    }
}

/* 产品列表卡片 - 白底细边框 */
.pl-card {
    background: var(--card-bg);
    border-radius: 0.5rem;
    overflow: hidden;
    display: block;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}
.pl-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    border-color: var(--primary);
}
.pl-card-img {
    height: 144px;
    background: var(--page-bg);
    padding: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
@media (min-width: 768px) { .pl-card-img { height: 176px; } }
.pl-card-img img {
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}
.pl-card:hover .pl-card-img img { transform: scale(1.05); }
.pl-card-img i { font-size: 48px; color: #D1D5DB; }
.pl-card-body { padding: 0.75rem; }
@media (min-width: 768px) { .pl-card-body { padding: 1rem; } }
.pl-card-model {
    display: inline-block;
    font-size: 10px;
    color: var(--accent-orange);
    background: var(--page-bg);
    padding: 2px 6px;
    border-radius: 0.25rem;
}
.pl-card-name {
    font-size: 0.9375rem;
    font-weight: 500;
    margin-top: 0.5rem;
    color: var(--text-main);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.2s;
}
.pl-card:hover .pl-card-name { color: var(--primary); }
.pl-card-desc {
    font-size: 0.8125rem;
    color: var(--text-light);
    margin-top: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── 八、空状态 ── */
.empty-state {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--text-light);
}
.empty-state i { font-size: 48px; margin-bottom: 1rem; }
.empty-state p { font-size: 0.9375rem; }

/* ── 九、分页容器 ── */
.page-wrap { margin-top: 2.5rem; }

/* ── 十、产品详情页 ── */
.detail-main { padding: 2rem 0; background: var(--card-bg); }
@media (min-width: 768px) { .detail-main { padding: 3rem 0; } }

.detail-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}
@media (min-width: 1024px) {
    .detail-layout {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
}

/* 图集 */
.detail-gallery-main {
    background: var(--page-bg);
    border-radius: 0.5rem;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    border: 1px solid var(--border-color);
}
.detail-gallery-main img {
    width: 100%; height: 100%;
    object-fit: contain;
    padding: 1rem;
}
.detail-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}
.detail-thumb {
    background: var(--page-bg);
    border-radius: 0.5rem;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.6;
    transition: all 0.15s ease;
}
.detail-thumb:hover { opacity: 1; }
.detail-thumb.active {
    border-color: var(--primary);
    opacity: 1;
}
.detail-thumb img {
    width: 100%; height: 100%;
    object-fit: contain;
    padding: 0.5rem;
}

/* 产品信息 */
.detail-cat-tag {
    display: inline-block;
    font-size: 0.8125rem;
    color: var(--accent-orange);
    background: var(--page-bg);
    padding: 2px 8px;
    border-radius: 0.25rem;
    margin-bottom: 0.75rem;
}
.detail-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}
@media (min-width: 768px) { .detail-title { font-size: 1.75rem; } }
.detail-model {
    font-size: 0.9375rem;
    color: var(--text-light);
    margin-bottom: 1.25rem;
}

/* 询价区 */
.inquiry-box {
    background: var(--page-bg);
    border-radius: 0.5rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}
.inquiry-price-row {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}
.inquiry-price {
    color: var(--accent-red);
    font-size: 1.5rem;
    font-weight: 700;
}
.inquiry-price-note {
    font-size: 0.8125rem;
    color: var(--text-light);
    margin-bottom: 4px;
}
.inquiry-btns { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn-outline-red {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid var(--accent-red);
    color: var(--accent-red);
    padding: 0.625rem 1.5rem;
    border-radius: 0.5rem;
    transition: all 0.15s ease;
    font-size: 15px;
}
.btn-outline-red:hover { background: var(--accent-red); color: #fff; }

/* 参数表 */
.param-table { width: 100%; font-size: 0.9375rem; }
.param-table tr { border-bottom: 1px solid var(--border-color); }
.param-table td { padding: 0.625rem 0; }
.param-table td:first-child { color: var(--text-light); width: 33.333%; }
.param-table td:last-child { font-weight: 500; color: var(--text-main); }

/* ── 十一、产品正文（富文本） ── */
.detail-content { padding: 2.5rem 0; background: var(--page-bg); }
@media (min-width: 768px) { .detail-content { padding: 4rem 0; } }
.detail-content-box {
    max-width: 56rem;
    margin: 0 auto;
    background: var(--card-bg);
    border-radius: 0.5rem;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}
@media (min-width: 768px) { .detail-content-box { padding: 2.5rem; } }
.detail-content-head { margin-bottom: 2rem; }
.detail-content-head h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}
.detail-content-head .line {
    width: 3rem; height: 0.25rem;
    background: var(--primary);
    border-radius: 9999px;
}

/* 富文本正文样式 */
.article { color: var(--text-sub); line-height: 1.8; }
.article h2 {
    font-size: 1.25rem; font-weight: 700; color: var(--text-main);
    margin: 2rem 0 1rem; padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(22, 93, 255, 0.2);
}
.article h2:first-child { margin-top: 0; }
.article h3 {
    font-size: 1.125rem; font-weight: 700; color: var(--text-main);
    margin: 1.5rem 0 0.75rem;
}
.article p {
    margin-bottom: 1rem;
    font-size: 0.9375rem;
    line-height: 1.8;
}
@media (min-width: 768px) { .article p { font-size: 1rem; } }
.article ul, .article ol {
    margin-bottom: 1rem; padding-left: 1.25rem;
    font-size: 0.9375rem; line-height: 1.8;
}
.article ul { list-style: disc; }
.article ol { list-style: decimal; }
.article li { margin-bottom: 0.25rem; }
@media (min-width: 768px) { .article ul, .article ol { font-size: 1rem; } }
.article strong { color: var(--text-main); font-weight: 600; }
.article img { border-radius: 0.5rem; margin: 1rem 0; max-width: 100%; }
.article table {
    width: 100%; font-size: 0.9375rem;
    border: 1px solid var(--border-color); margin: 1rem 0;
    border-collapse: collapse;
}
.article th {
    background: var(--primary); color: #fff;
    padding: 0.625rem 1rem; text-align: left;
}
.article td {
    padding: 0.625rem 1rem;
    border-bottom: 1px solid var(--border-color);
}
.article tr:nth-child(even) td { background: var(--page-bg); }
.article blockquote {
    border-left: 4px solid var(--primary);
    padding: 0.5rem 1rem; margin: 1rem 0;
    background: var(--page-bg);
    border-radius: 0 0.25rem 0.25rem 0;
    font-size: 0.9375rem; color: var(--text-sub);
}

/* ── 十二、相关产品 ── */
.related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}
@media (min-width: 768px) {
    .related-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.25rem;
    }
}
.rp-card {
    background: var(--card-bg);
    border-radius: 0.5rem;
    overflow: hidden;
    display: block;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}
.rp-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    border-color: var(--primary);
}
.rp-card-img {
    height: 128px;
    background: var(--page-bg);
    padding: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
@media (min-width: 768px) { .rp-card-img { height: 160px; } }
.rp-card-img img {
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}
.rp-card:hover .rp-card-img img { transform: scale(1.05); }
.rp-card-img i { font-size: 40px; color: #D1D5DB; }
.rp-card-body { padding: 0.75rem; }
@media (min-width: 768px) { .rp-card-body { padding: 1rem; } }
.rp-card-name {
    font-size: 0.9375rem; font-weight: 500; color: var(--text-main);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    transition: color 0.2s;
}
.rp-card:hover .rp-card-name { color: var(--primary); }
.rp-card-model {
    font-size: 0.8125rem; color: var(--text-light); margin-top: 0.25rem;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
