/* ==========================================================
 * 煜通百泰 产品列表页样式 products.css
 * 包含：Banner / 左侧分类树 / 右侧产品列表 / 分页
 * 依赖：base.css（主题变量与公共组件）
 * 单位说明：1rem = 16px（@1920px 设计稿，html{font-size:0.83328vw}）
 * ========================================================== */



/* 搜索结果页：Banner 内搜索框 */
.pro-banner-search {
    display: flex;
    width: min(28rem, 100%);
    margin-top: 1rem;
    border-color: rgba(255, 255, 255, 0.55);
    background: var(--color-white);
}
.pro-banner-search .product-search-input {
    color: var(--color-text);
}
.pro-banner-search .search-submit,
.pro-banner-search .voice-btn {
    width: 2.25rem;
    height: 2.25rem;
    flex-shrink: 0;
}
.product-search-grid {
    margin-bottom: 2rem;
}
@media (max-width: 767.98px) {
    .pro-banner-search {
        display: flex;
        width: 100%;
        max-width: 22rem;
    }
}

/* ==================== 产品中心主体 ==================== */
.product-main {
    background: var(--color-bg);
}
.product-main-row {
    display: flex;
    gap: 6rem;
    align-items: flex-start;
}

/* ---------- 左侧分类树 ---------- */
.product-cat {
    width: 18.75rem;
    flex-shrink: 0;
    position: sticky;
    top: 2rem;
}
/* 一级分类项通用 */
.cat-item { cursor: pointer;margin-bottom: 0.125rem; }
.cat-item .cat-l1{
    background: #7892AC;
    color: var(--color-white);
}
/* 选中子类时，父级一级高亮（青色背景白字） */
.cat-item.active .cat-l1 {
    background: var(--color-accent);
    color: var(--color-white);
}
/* 一级：全部产品（主色底） */
.cat-l1-all {
    background: var(--color-primary);
    color: var(--color-white);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: background 0.2s;
}
/* "全部产品"选中时加深主色 + 左侧青色指示条 */
.cat-item.active .cat-l1-all {
    background: #0a1a3d;
    box-shadow: inset 4px 0 0 var(--color-accent);
}
.cat-l1-all .cat-l1-name {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}
.cat-l1-all .cat-l1-en {
    font-size: 0.875rem;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}
/* 一级：普通分类（有子级为 div，无子级为可跳转 a） */
.cat-l1 {
    background: var(--color-white);
    color: var(--color-primary);
    padding: 1.5rem;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.2s, color 0.2s;
    text-decoration: none;
}
a.cat-l1 { cursor: pointer; }
.cat-l1:hover { background: var(--color-accent); color: var(--color-white); }
/* 展开箭头 */
.cat-l1-arrow {
    width: 0.75rem;
    height: 0.75rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.3s;
    flex-shrink: 0;
}
.cat-item.open .cat-l1-arrow { transform: rotate(-135deg); }

/* 二级分类列表 */
.cat-l2-list {
    background: var(--color-white);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}
.cat-item.open .cat-l2-list { max-height: 20rem; }
.cat-l2-item {
    display: block;
    padding: 1.5rem;
    color: var(--color-text);
    font-size: 1.25rem;
    border-bottom: 1px solid var(--color-border);
    transition: color 0.2s, padding-left 0.2s;
    cursor: pointer;
}
.cat-l2-item:last-child { border-bottom: none; }
.cat-l2-item:hover { color: var(--color-accent); }
.cat-l2-item.active { color: var(--color-accent); padding-left: 2rem; }

/* ---------- 右侧产品列表 ---------- */
.product-list-wrap {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
}
/* 标题栏 */
.product-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.product-list-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.product-list-title-bar {
    width: 0.25rem;
    height: 2rem;
    background: var(--color-accent);
    border-radius: 0.125rem;
}
.product-list-title-text {
    font-size: 2rem;
    font-weight: 400;
    color: var(--color-text);
    margin: 0;
}


/* 筛选按钮（PC 端隐藏，平板/移动端显示） */
.product-filter {
    display: none;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    background: var(--color-white);
    border: 1px solid var(--color-primary);
    border-radius: 3.75rem;
    color: var(--color-primary);
    font-size: 0.875rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s, color 0.2s;
}
.product-filter:hover {
    background: var(--color-primary);
    color: var(--color-white);
}
.product-filter img { width: 0.875rem; height: 0.875rem; }

/* 产品网格 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}
/* 产品卡片 */
.pro-card {
    background: var(--color-white);
    border-radius: 0.5rem;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}
.pro-card:hover {
    transform: translateY(-0.375rem);
    box-shadow: 0 1rem 2.5rem rgba(18, 38, 79, 0.12);
}
/* 有货标签 */
.pro-tag {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: var(--color-primary);
    color: var(--color-white);
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 3.75rem;
    z-index: 2;
}
/* 产品图片 */
.pro-card-pic {
    border-radius: 1rem;
    overflow: hidden;
}
.pro-card-pic img {
    transition: transform 0.3s;
}
.pro-card:hover .pro-card-pic img { transform: scale(1.05); }
/* 产品信息 */
.pro-card-info {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    flex: 1;
}
.pro-name-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.pro-name {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--color-primary);
    margin: 0;
}
.pro-name-lines {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1 1 0;
}
.pro-name-line {
    width: 100%;
    height: 2px;
    background: var(--color-accent);
}
.pro-cas {
    font-size: 1rem;
    color: var(--color-text-2);
    margin: 0;
}
.pro-meta {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 1rem;
    color: var(--color-text-2);
}
.pro-more {
    margin-top: auto;
    font-size: 0.875rem;
    color: var(--color-primary);
    padding-top: 2rem;
}



/* ==================== 移动端分类筛选弹窗 ==================== */
.filter-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: flex-end;          /* 从底部滑出 */
    justify-content: center;
}
.filter-modal.show { display: flex; }

/* 遮罩 */
.filter-modal-mask {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s;
}
.filter-modal.show .filter-modal-mask { opacity: 1; }

/* 弹窗主体（从底部滑入） */
.filter-modal-body {
    position: relative;
    width: 100%;
    max-height: 80vh;
    background: var(--color-bg);
    border-radius: 1rem 1rem 0 0;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}
.filter-modal.show .filter-modal-body { transform: translateY(0); }

/* 弹窗头部 */
.filter-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    background: var(--color-white);
    border-radius: 1rem 1rem 0 0;
    flex-shrink: 0;
}
.filter-modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
}
.filter-modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text);
}
.filter-modal-close img { transform: rotate(180deg); }

/* 弹窗内容（分类树，可滚动） */
.filter-modal-content {
    padding: 1rem;
    overflow-y: auto;
    flex: 1;
}
.filter-modal-content .product-cat { width: 100%; }

/* ==================== 响应式适配 ==================== */
@media (max-width: 1400px) {
    .product-grid{
        grid-template-columns: repeat(2, 1fr);
    }
}
/* 平板：<1200px —— 隐藏左侧分类，显示筛选按钮，弹窗承载分类 */
@media (max-width: 1199.98px) {
    .pro-banner{margin-top: 0;}
    .product-cat { display: none; }          /* 隐藏左侧分类树 */
    .product-filter { display: inline-flex; }  /* 显示筛选按钮 */
    .product-grid { gap: 1.5rem; }
}
/* 移动端：<768px */
@media (max-width: 767.98px) {
    .product-list-title-text { font-size: 1.25rem; }
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    .pro-name { font-size: 1.5rem; }
    .cat-l1-all .cat-l1-name {
        font-size: 1.25rem;
    }
    .cat-item .cat-l1 {
        font-size: 1.125rem;
    }
    .cat-l2-item {
        font-size: 1rem;
    }
}
/* 小屏：<480px */
@media (max-width: 479.98px) {
    .product-grid { grid-template-columns: 1fr; }
}

/* ============================================================
 * 产品详情页样式（show.pro.html）
 * ============================================================ */

/* ---------- 产品参数区 ---------- */
.pro-detail-row {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}
/* 左侧：图片 Swiper */
.pro-gallery {
    width: 28.75rem;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}
.pro-gallery-main {
    width: 28.75rem;
    height: 28.75rem;
    border: 1px solid #DDDDDD;
    border-radius: 0.5rem;
    overflow: hidden;
    background: var(--color-white);
}
.pro-gallery-main .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
}
.pro-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* 缩略图 Swiper */
.pro-gallery-thumbs {
    width: 100%;
}
.pro-gallery-thumbs .swiper-slide {
    width: 8.75rem;
    height: 5rem;
    border: 1px solid #DDDDDD;
    border-radius: 0.5rem;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s, border-color 0.2s;
}
.pro-gallery-thumbs .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.pro-gallery-thumbs .swiper-slide-thumb-active {
    opacity: 1;
    border-color: var(--color-accent);
}

/* 右侧：产品信息 */
.pro-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}
.pro-info-name {
    font-size: 2.25rem;
    font-weight: 400;
    color: var(--color-text);
    margin: 0;
}
/* 参数网格（2列 × 5行） */
.pro-param-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem 1.25rem;
}
.pro-param-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.pro-param-label {
    width: 8.75rem;
    font-size: 1.25rem;
    color: var(--color-text-2);
    margin: 0;
    flex-shrink: 0;
}
.pro-param-value {
    font-size: 1.25rem;
    color: var(--color-text);
    margin: 0;
}
/* 在线询价按钮 */
.pro-inquiry-btn {
    align-self: flex-start;
    padding: 1.5rem 8rem;
    background: var(--color-accent);
    color: var(--color-white);
    border: none;
    border-radius: 3.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}
.pro-inquiry-btn:hover { background: #00b386; }

/* ---------- 详细描述区 ---------- */
.pro-desc {
    background: var(--color-bg);
    padding: 0 0 5rem;
}
.pro-desc-content {
    background: var(--color-white);
    padding: 2rem 4rem;
    border-radius: 0.5rem;
}
.pro-desc-text {
    font-size: 1.25rem;
    line-height: 2em;
    color: var(--color-text);
    margin: 0;
    white-space: pre-line;
}
.pro-desc-text strong { font-weight: 700; }
/* 免责声明框 */
.pro-disclaimer {
    margin-top: 0.625rem;
    padding: 2rem;
    border: 1px solid #C00000;
    border-radius: 1rem;
    background: var(--color-white);
}
.pro-disclaimer p {
    color: #C00000;
    font-size: 1.25rem;
    line-height: 2em;
    margin: 0;
}

/* ---------- 相关推荐区 ---------- */
.pro-related {
    background: var(--color-bg);
    padding: 0 0 5rem;
}
.pro-related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem;
}

/* ---------- 产品详情页响应式 ---------- */
@media (max-width: 1199.98px) {
    .pro-detail-row { flex-direction: column; }
    .pro-gallery { width: 100%; }
    .pro-gallery-main { width: 100%; height: auto; aspect-ratio: 1; }
    .pro-related-grid { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
}
@media (max-width: 767.98px) {
    .pro-desc-content { padding: 1.5rem; }
    .pro-param-grid { grid-template-columns: 1fr; gap: 1rem; }
    .pro-param-label { width: 7rem; font-size: 1rem; }
    .pro-param-value { font-size: 1rem; }
    .pro-info-name { font-size: 1.75rem; }
    .pro-inquiry-btn { width: 100%; padding: 1rem; }
    .pro-related-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    .pro-disclaimer p { font-size: 1rem; }
    .pro-desc {
        padding: 0;
    }
}
@media (max-width: 479.98px) {
    .pro-related-grid { grid-template-columns: 1fr; }
}
