﻿root {
    background-color: #f0f2f5; /* 或者你的底色 #f0f2f5 */
}

html {
    scrollbar-gutter: stable;
}

html, body {
    height: auto;
    margin: 0;
    background-color: #f0f2f5; /* 灰色底色衬托立体感 */
}

body {
    padding-top: 60px; /* 为 60px 导航条留位 */
    padding-right: calc(100vw - 100%);
}
    /* 解决弹出窗母窗左移问题，打开模态框时动态添加的类名进行强制覆盖 */
    body.modal-open {
        overflow-y: scroll !important; /* 强制模态框打开时也不隐藏滚动条 */
        padding-right: 0 !important; /* 强制不让 JS 添加右侧内边距 */
    }

/* 独立区块 1：侧边栏卡片 */
.sidebar-aside {
    width: 260px;
    min-width: 260px;
    flex-shrink: 0;
    border-radius: 12px; /* 稍微圆润一点更具现代感 */
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    padding: 20px;
    /* 粘性定位 */
    position: sticky;
    top: 75px; /* 60px 导航 + 15px 间距 */
    height: calc(100vh - 90px);
    overflow-y: auto;
    transform: translateZ(0);
    background-color: #ffffff;
    padding: 15px;
}
    /* 2. 普通状态下的按钮文字颜色 */
    .sidebar-aside .nav-link {
        color: #444 !important; /* 默认深灰，易于阅读 */
        font-weight: 500;
        margin-bottom: 5px;
        border-radius: 8px;
        transition: all 0.2s ease;
    }

        /* 3. 鼠标悬停时的状态（感应色） */
        .sidebar-aside .nav-link:hover {
            background-color: #e8eaf6 !important; /* 淡淡的靛蓝色背景 */
            color: #1a237e !important; /* 文字变为导航条主色 */
        }

        /* 4. 激活选中状态（与导航条颜色一致） */
        .sidebar-aside .nav-link.active {
            background-color: #1a237e !important; /* 导航条主色 */
            color: #ffffff !important; /* 纯白文字 */
            box-shadow: 0 4px 8px rgba(26, 35, 126, 0.2); /* 增加一点立体感 */
        }


.page-layout {
    display: flex;
    width: 100%;
    padding-top: 15px; /* 距导航条 15px */
    padding-bottom: 15px;
    align-items: flex-start;
}


/* 右侧独立大区块 */
.product-section {
    flex-grow: 1;
    margin-left: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    padding: 30px 30px 5px 30px;
    transform: translateZ(0);
}

.product-info {
    flex-grow: 1;
    margin-left: 0px;
}

/* 产品块设计 */
.product-item {
    border-radius: 12px;
    padding: 16px; /* 四周间距 */
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    display: flex; /* 开启弹性布局 */
    align-items: stretch; /* 让左右高度尽量一致 */
    gap: 12px; /* 元素之间的左右间距 */
}
/* 产品描述块设计 */
.product-content {
    flex: 1; /* 占据除图片外的所有剩余宽度 */
    display: flex;
    flex-direction: column; /* 让内部的 标题描述 和 按钮组 上下排列 */
    justify-content: space-between; /* 描述在上，按钮在最下 */
    height: 150px;
}

/* 3. 按钮组：确保它们横向平铺 */
.product-actions {
    display: flex;
    flex-direction: row; /* 强制横向排列 */
    flex-wrap: wrap; /* 如果按钮太多，允许换行 */
    gap: 12px;
    padding-top: 0px; /* 与上方文字保持间距 */
    margin-left: -8px; /* 视觉对齐补偿 */
    justify-content: right;
}
/* 最后一个产品去掉分隔线 */
.product-item:last-child {
    border-bottom: none;
}

.product-item:first-child {
}

.img-placeholder {
    width: 220px;
    height: 150px;
    flex-shrink: 0;
    margin-right: 5px;
    border-radius: 5px;
    overflow: hidden;
    background: #f8f9fa;
}

.product-title {
    font-size: 1.15rem !important; /* 缩小字号，1.1-1.2rem 比较适中 */
    padding-top: 0; /* 取消上间距 */
    margin-bottom: 5px !important; /* 将下间距从默认或 mb-3 缩小到 8px */
    line-height: 1.2; /* 缩减行高，让文字更紧凑 */
    /*color: #333;  深灰色看起来比纯黑更高级 */
    color: #1a237e;
}

.desc-text {
    margin-bottom: 5px !important;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4; /* 这里设置你想显示的行数 */
    overflow: hidden;
    text-overflow: ellipsis;
    /* 配合 line-height 确保高度整齐 */
    line-height: 1.4;
    max-height: 5.6em; /* 行数 * line-height */
    margin-left: 0;
    padding: 0px 0px 0px 0px; /* padding: 上 右 下 左; */
}

.bottom-right-text {
    position: absolute;
    right: 0; /* 贴在最右侧 */
    bottom: 10px; /* 距离本项底部分隔线 25px (与 padding 对齐) */
    /* 样式 */
    font-size: 13px;
    color: #888;
    padding: 2px 8px;
    border-radius: 4px;
}

/* 5. 专门处理那个“查看所有产品”的 Button 按钮 */
#tab-all {
    border: none;
    background: transparent;
}

/* 按钮：平时透明，无边框 */
.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 30px; /* 固定高度，确保不超出边线 */
    box-sizing: border-box; /* 边框和内边距不占用额外高度 */

    padding: 0 16px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 4px;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none !important; /* 强制取消下划线 */
}

/* 悬停时的感应效果 */
.btn-ghost:hover {
    background-color: #f0f2f5; /* 触发感应背景色（与你的 body 底色呼应） */
    color: #1a237e !important; /* 悬停时文字变为导航条主色 */
}

.btn-ghost .icon {
    font-size: 16px;
    /* 平时可以给图标一个淡淡的颜色，让它更灵动 */
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.2s;
}

.btn-ghost:hover .icon {
    filter: grayscale(0%); /* 悬停时图标恢复彩色 */
    opacity: 1;
}

.product-actions {
    display: flex;
    gap: 12px;
    margin-top: 3px;
    margin-bottom: 5px; /* 留出底部间距，防止贴边 */
    align-items: center; /* 垂直居中 */
    flex-wrap: wrap; /* 移动端自动换行，防止溢出 */
}

/* 立即购买：使用主色 #1a237e */
.btn-buy {
    background-color: #1a237e;
    color: #ffffff !important;
    border: 1px solid #1a237e;
}

    .btn-buy:hover {
        background-color: #283593; /* 稍微亮一点的蓝色 */
        border-color: #283593;
        box-shadow: 0 2px 8px rgba(26, 35, 126, 0.3);
    }

/* 下载按钮：与主色调呼应的幽灵按钮 */
.btn-download {
    background-color: #ffffff;
    color: #1a237e !important;
    /*border: 1px solid #c5cae9;  使用主色的浅色系作为边框 */
}

    .btn-download:hover {
        background-color: #f5f5fb;
        border-color: #1a237e;
        color: #1a237e !important;
    }

.btn-action .icon {
    margin-right: 6px;
    font-size: 16px;
    line-height: 1;
}

/* 下载实现悬停自动下拉 */
@media (min-width: 992px) {
    .custom-hover-dropdown:hover > .dropdown-menu {
        display: block;
        margin-top: 0;
    }

    /* 2. 三级菜单（代理软件右侧弹出） */
    .dropdown-menu .dropend:hover > .dropdown-menu {
        display: block;
        position: absolute;
        left: 100%; /* 在右侧弹出 */
        top: 0;
        margin-top: -1px;
    }
}