
.page-header {
    background-color: var(--primary-color);
    color: var(--light-color);
    padding: 80px 0 50px;
}

.page-title {
    font-weight: 700;
    margin-bottom: 15px;
}

.breadcrumb {
    font-size: 14px;
    background: transparent;
    padding: 0;
    margin-bottom: 0;
}

.breadcrumb-item a {
    text-decoration: none;
    color: rgb(9, 9, 9);
}

.breadcrumb-item a:hover {
    text-decoration: none; /* 悬停时也不显示下划线 */
    /* 或者改成其他效果，比如只变色 */
    color: #0d6efd; /* 仅变色，无下划线 */
}


.breadcrumb-item.active {
    color: rgb(107, 104, 104);
}

.products-section {
    padding: 80px 0;
    /*background: #f5f5f5;*/
}

.section-title {
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 15px;
}

.section-title h2 {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--accent-color);
}


/* 面包屑导航样式 */
.breadcrumb-container {
    background: transparent;
    padding: 0;
    margin-bottom: 25px;
}

/* 侧边栏样式 */
.sidebar {
    background-color: #fff;
    border-radius: 5px;
    /*box-shadow: 0 0 10px rgba(0,0,0,0.05);*/
    padding: 20px;
    box-shadow: 0 2px 8px #0000001a;
}
.sidebar .nav-link {
    color: #333;
    padding: 8px 15px;
    border-radius: 4px;
}
.sidebar .nav-link:hover {
    background-color: #f1f1f1;
}
.sidebar .nav-link.active {
    background-color: #0d6efd;
    color: white;
}

.category-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}
.subcategory {
    padding-left: 20px;
}
.subcategory .nav-link {
    padding: 5px 15px;
    font-size: 14px;
}


/* 产品分类选中状态 - 只高亮字体，没有背景色 */
.category-active {
    color: #0d6efd !important;  /* Bootstrap主色调蓝色 */
    font-weight: 600 !important;  /* 加粗 */
    background-color: transparent !important; /* 确保无背景色 */
}

/* 覆盖Bootstrap默认的active样式，确保没有背景色 */
.list-group-item.category-active {
    background-color: transparent !important;
    border-color: transparent !important;
}


/* ---------- 核心功能 CSS：限制产品名称最多两行，超出省略 ---------- */
.product-name {
    /* 现代多行文本截断法 (基于行高和行数) */
    display: -webkit-box;
    -webkit-line-clamp: 2;          /* 限制显示两行 */
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;               /* 建议明确行高，避免不同浏览器差异 */
    max-height: calc(1.4em * 2);     /* 辅助兼容，但不是必须，-webkit-line-clamp已够 */
    word-break: break-word;          /* 防止长单词破坏盒子 */
    margin-bottom: 0.5rem;            /* 与卡片其他内容间距 */
    font-size: 15px;
    cursor: pointer;
    height: 41px;
}

.product-name:hover {
    text-decoration: underline;
    color: #0066cc;
}




.product-price {
    color: #0a0a0a;
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 15px;
}

.product-meta {
    font-size: 13px;
    color: #7f8c8d;
    margin-bottom: 12px;
    line-height: 1.5;
}



/* 分页样式 */
.pagination .page-item .page-link {
    border-radius: 6px;
    margin: 0 4px;
    border: 1px solid #eaeaea;
    color: #555;
}

.pagination .page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: white;
}

/* 顶部工具栏样式 */
.toolbar {
    background: #fff;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.results-count {
    font-size: 15px;
    color: #7f8c8d;
}


/* 自定义按钮样式 */
.btn-outline-primary {
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 14px;
}

.btn-outline-success {
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 14px;
}

/* 排序下拉菜单 */
.sort-dropdown .dropdown-toggle {
    border-radius: 6px;
    padding: 8px 15px;
    font-size: 14px;
}

.view-btn {
    background: white;
    border: 1px solid #ddd;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.view-btn:hover {
    background: #f1f1f1;
}

.view-btn.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.products-container {
    margin-top: 0px;
}


/* 产品操作按钮 */
.product-actions {

    position: absolute;
    bottom: 15px;
    right: 15px;
    display: flex;
    gap: 10px;
}

.btn-inquiry {
    padding: 8px 16px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    font-size: 0.85rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-inquiry:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.btn-inquiry:active {
    transform: translateY(0);
}

.btn-inquiry i {
    margin-right: 6px;
    font-size: 0.9rem;
}


/* 响应式设计 */
@media (max-width: 768px) {
    /*.list-view .product-card {*/
    /*    flex-direction: column;*/
    /*}*/

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }

}

/* 无产品时的提示 */
.no-products {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.no-products i {
    font-size: 48px;
    color: #bdc3c7;
    margin-bottom: 15px;
}

.no-products p {
    color: #7f8c8d;
    font-size: 18px;
}


/* List View (Hidden by default) */
.products-list {
    display: none;
}

/* Grid View (Default) */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}


select {
    padding: 10px 15px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: white;
    color: #334155;
}

.products-container {
    transition: all 0.3s ease;
}

/* Grid View (Default) */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    /*box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);*/
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;

    box-shadow: 0 2px 8px #0000001a;
    /*box-shadow: 0 0 10px #0000001a;*/
    padding: 6px;
    height: 471px;
}

/*.product-card:hover {*/
/*    transform: none;*/
/*}*/

/*.product-card:active {*/
/*    transform: translateY(-2px);*/
/*}*/



.product-image {
    height: 300px;
    overflow: hidden;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;

}
.product-image:after {
    background-color: rgba(0, 0, 0, .04);
    border-radius: 8px;
    bottom: 0;
    content: "";
    left: 0;
    pointer-events: none;
    position: absolute;
    right: 0;
    top: 0;
    z-index: 1;
}
.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 20px 12px 0 12px;
}


/* List View (Hidden by default) */
.products-list {
    display: none;
}

.product-row {
    display: flex;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    position: relative;
    cursor: pointer;
}

.product-row-image {
    width: 250px;
    min-width: 250px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-row-image img {
    max-width: 90%;
    max-height: 180px;
    object-fit: contain;
}

.product-row-info {
    padding: 25px;
    flex: 1;
}


/* 目录分类高亮样式 */
.category-link.category-active,
.nav-link.list-group-item-action.category-active {
    color: #0d6efd !important;  /* Bootstrap主色调蓝色 */
    font-weight: 600 !important;  /* 加粗 */
    background-color: transparent !important; /* 确保无背景色 */
}

.category-link.category-active i,
.nav-link.list-group-item-action.category-active i {
    color: #0d6efd !important;  /* Bootstrap主色调蓝色 */
}

/* 一级分类链接样式 */
.nav-link[data-bs-toggle="collapse"] {
    cursor: pointer;
    transition: background-color 0.2s;
}

.nav-link[data-bs-toggle="collapse"]:hover {
    background-color: #f8f9fa;
}

/* 箭头图标过渡效果 */
.nav-link i[id^="arrow-"] {
    transition: transform 0.2s;
}




/* Responsive design */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }

    .product-row {
        flex-direction: column;
    }

    .product-row-image {
        width: 100%;
        height: 200px;
    }

    select {
        flex: 1;
    }

    .products-section {
        padding: 50px 0;
    }

    .page-header {
        padding: 60px 0 30px;
    }


}