/* 页面整体背景 */
.goods_cate {
    background: #f9f9f9;
    min-height: 800px;
}

/* 分类导航面包屑 */
.goods-cate-menu {
    background: white;
    padding: 15px 20px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.goods-cate-menu a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
}

.goods-cate-menu a:hover {
    color: #1E9FFF;
}

.goods-cate-menu .goods-cate-one {
    margin: 0 5px;
    height: 24px;
    line-height: 22px;
}

.goods-cate-menu .layui-nav-tree {
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    border-radius: 4px;
    border: none;
}

.goods-cate-menu .layui-nav-tree .layui-nav-item {
    border-bottom: 1px solid #f6f6f6;
}

.goods-cate-menu .layui-nav-tree .layui-nav-item:last-child {
    border-bottom: none;
}

.goods-cate-menu .layui-nav-tree .layui-nav-item a {
    color: #666;
    padding: 10px 15px;
}

.goods-cate-menu .layui-nav-tree .layui-nav-item a:hover {
    background-color: #f2f2f2;
    color: #333;
}

/* 二级分类横向排列 */
.second-cate-horizontal {
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.second-cate-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 5px 0;
}

.second-cate-item {
    display: inline-block;
    padding: 8px 16px;
    background: #f8f8f8;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
    white-space: nowrap;
}

.second-cate-item:hover {
    background: #1E9FFF;
    color: white;
    border-color: #1E9FFF;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(30,159,255,0.3);
}

.second-cate-item.active {
    background: #FF5722;
    color: white;
    border-color: #FF5722;
}

/* 三级分类横向排列 */
.third-cate-row {
    margin-bottom: 30px;
}

.third-cate-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 5px 0;
}

.third-cate-item {
    display: inline-block;
    padding: 6px 14px;
    background: #f8f8f8;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    color: #666;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.3s;
    white-space: nowrap;
}

.third-cate-item:hover {
    background: #5FB878;
    color: white;
    border-color: #5FB878;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(95,184,120,0.3);
}

.third-cate-item.active {
    background: #5FB878;
    color: white;
    border-color: #5FB878;
}

/* 排序区域 */
.sort-row {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.sort-container {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.sort-item {
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    background: #f8f8f8;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}

.sort-item:hover {
    background: #1E9FFF;
    color: white;
    border-color: #1E9FFF;
}

.sort-item.active {
    background: #1E9FFF;
    color: white;
    border-color: #1E9FFF;
}

.condition-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
}

.condition-filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.condition-filter-item {
    padding: 8px 16px;
    border: 1px solid #e6e6e6;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
}

.condition-filter-item:hover {
    border-color: #5FB878;
    color: #5FB878;
}

.condition-filter-item.active {
    background-color: #5FB878;
    color: white;
    border-color: #5FB878;
}

/* 价格排序按钮 */
.sort-item.price-sort {
    position: relative;
    padding-right: 40px;
}

.sort-icon {
    position: absolute;
    right: 15px;
    display: flex;
    flex-direction: column;
    height: 14px;
    width: 14px;
}

.sort-icon i {
    font-size: 12px;
    line-height: 7px;
    color: #ccc;
    transition: all 0.3s;
}

/* 价格排序状态 */
.sort-item.price-sort.asc .sort-icon .layui-icon-up {
    color: #FF5722;
}

.sort-item.price-sort.desc .sort-icon .layui-icon-down {
    color: #FF5722;
}

/* 商品列表区域 */
.goods_cate_content {
    margin-top: 20px;
}

.single-products {
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #f0f0f0;
    background: white;
}

.single-products:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    border-color: #1E9FFF;
}

.single-products .layui-card-header {
    padding: 0;
    border: none;
    background: #f9f9f9;
}

.single-products .product-img {
    position: relative;
    overflow: hidden;
}

.single-products .product-img img {
    transition: transform 0.5s ease;
}

.single-products:hover .product-img img {
    transform: scale(1.05);
}

.single-products .layui-card-body {
    padding: 15px;
}

.single-products .layui-card-body a.layui-font-16 {
    color: #333;
    text-decoration: none;
    line-height: 1.4;
    height: 45px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.3s;
}

.single-products .layui-card-body a.layui-font-16:hover {
    color: #1E9FFF;
}

.single-products .layui-badge-rim {
    font-size: 18px;
    padding: 2px 8px;
    border: none;
    background: linear-gradient(135deg, #FF5722, #FF8A65);
    color: white;
    border-radius: 3px;
}

.single-products del {
    color: #999;
    margin-left: 8px;
    font-size: 14px;
}

.single-products .layui-word-aux {
    color: #888;
    font-size: 13px;
}

/* 空数据状态 */
.layui-text-center i.layui-icon-search {
    opacity: 0.5;
}

.layui-text-center p {
    color: #888;
    margin-top: 15px;
}

/* 分页样式 */
.pc-more-goods {
    margin-top: 40px;
    margin-bottom: 40px;
}

.pc-more-goods .layui-laypage {
    text-align: center;
}

.pc-more-goods .layui-laypage a,
.pc-more-goods .layui-laypage span {
    border-radius: 4px;
    margin: 0 3px;
    border: 1px solid #e6e6e6;
    background: white;
}

.pc-more-goods .layui-laypage a:hover {
    border-color: #1E9FFF;
    color: #1E9FFF;
}

.pc-more-goods .layui-laypage .layui-laypage-curr {
    background-color: #1E9FFF;
    border-color: #1E9FFF;
}

.pc-more-goods .layui-laypage .layui-laypage-curr em {
    color: white;
}

/* 响应式调整 */
@media (max-width: 1200px) {
    .layui-col-lg3 {
        width: 25%;
    }
}

@media (max-width: 992px) {
    .layui-col-md4 {
        width: 33.333333%;
    }
    
    .second-cate-container,
    .third-cate-container,
    .sort-container {
        gap: 8px;
    }
    
    .second-cate-item,
    .third-cate-item,
    .sort-item {
        padding: 6px 12px;
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .layui-col-sm6 {
        width: 50%;
    }
    
    .second-cate-container,
    .third-cate-container {
        gap: 6px;
    }
    
    .second-cate-item {
        padding: 5px 10px;
        font-size: 12px;
    }
    
    .third-cate-item {
        padding: 4px 8px;
        font-size: 11px;
    }
    
    .sort-container {
        gap: 6px;
    }
    
    .sort-item {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .sort-item.price-sort {
        padding-right: 35px;
    }
}

@media (max-width: 480px) {
    .layui-col-xs12 {
        width: 100%;
    }
    
    .single-products {
        margin-bottom: 15px;
    }
    
    .second-cate-container,
    .third-cate-container {
        gap: 4px;
    }
    
    .second-cate-item {
        padding: 4px 8px;
        font-size: 11px;
    }
    
    .third-cate-item {
        padding: 3px 6px;
        font-size: 10px;
    }
    
    .sort-container {
        gap: 4px;
    }
    
    .sort-item {
        padding: 4px 8px;
        font-size: 11px;
    }
    
    .sort-item.price-sort {
        padding-right: 30px;
    }
}

/* 分类下拉菜单动画 */
.goods-cate-menu .layui-nav-tree {
    animation: fadeInDown 0.3s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 加载动画 */
.loading-spinner {
    display: none;
    text-align: center;
    padding: 30px 0;
}

.loading-spinner.active {
    display: block;
}

.loading-spinner .layui-icon {
    font-size: 30px;
    color: #1E9FFF;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 卡片内边距调整 */
.layui-card {
    border-radius: 8px;
    overflow: hidden;
}

.layui-card-header {
    border-bottom: 1px solid #f0f0f0;
}

.layui-card-body {
    padding: 15px;
}

/* 一级分类样式 */
.first-cate-horizontal {
    margin-bottom: 20px;
}

.first-cate-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.first-cate-item {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 4px;
    background: #f8f8f8;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid #e6e6e6;
}

.first-cate-item:hover {
    background: #f2f2f2;
    color: #333;
    border-color: #d2d2d2;
}

.first-cate-item.active {
    background: #1E9FFF;
    color: white;
    border-color: #1E9FFF;
}

/* 二级分类样式 */
.second-cate-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.second-cate-item {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 4px;
    background: #f8f8f8;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid #e6e6e6;
}

.second-cate-item:hover {
    background: #f2f2f2;
    color: #333;
    border-color: #d2d2d2;
}

.second-cate-item.active {
    background: #FF5722;
    color: white;
    border-color: #FF5722;
}

/* 三级分类样式 */
.third-cate-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.third-cate-item {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 4px;
    background: #f8f8f8;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid #e6e6e6;
    font-size: 14px;
}

.third-cate-item:hover {
    background: #f2f2f2;
    color: #333;
    border-color: #d2d2d2;
}

.third-cate-item.active {
    background: #009688;
    color: white;
    border-color: #009688;
}

/* 排序区域样式 */
.sort-container {
    display: flex;
    gap: 10px;
}

.sort-item {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 4px;
    background: #f8f8f8;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid #e6e6e6;
}

.sort-item:hover {
    background: #f2f2f2;
    color: #333;
    border-color: #d2d2d2;
}

.sort-item.active {
    background: #5FB878;
    color: white;
    border-color: #5FB878;
}

.price-sort {
    display: flex;
    align-items: center;
    gap: 5px;
}

.sort-icon {
    display: flex;
    flex-direction: column;
    height: 16px;
}

.sort-icon i {
    font-size: 12px;
    line-height: 8px;
    color: #999;
}

.price-sort.asc .sort-icon i.layui-icon-up {
    color: #5FB878;
}

.price-sort.desc .sort-icon i.layui-icon-down {
    color: #5FB878;
}

/* 品牌筛选区域 */
.brand-filter-row {
    margin-top: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.brand-filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 5px 0;
}

.brand-filter-item {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: #f8f8f8;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    min-height: 40px;
    box-sizing: border-box;
}

.brand-filter-item:hover {
    background: #1E9FFF;
    color: white;
    border-color: #1E9FFF;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(30,159,255,0.3);
}

.brand-filter-item.active {
    background: #FF5722;
    color: white;
    border-color: #FF5722;
    position: relative;
}

.brand-filter-item.active::after {
    content: '✓';
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    background: #FF5722;
    color: white;
    border-radius: 50%;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
    margin-right: 8px;
    border-radius: 2px;
    border: 1px solid #eee;
    background: white;
    padding: 2px;
}

.brand-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .brand-filter-container {
        gap: 8px;
    }
    
    .brand-filter-item {
        padding: 6px 12px;
        font-size: 13px;
        min-height: 36px;
    }
    
    .brand-logo {
        width: 20px;
        height: 20px;
        margin-right: 6px;
    }
    
    .brand-name {
        max-width: 80px;
    }
}

@media (max-width: 480px) {
    .brand-filter-container {
        gap: 6px;
    }
    
    .brand-filter-item {
        padding: 4px 8px;
        font-size: 12px;
        min-height: 32px;
    }
    
    .brand-logo {
        width: 16px;
        height: 16px;
        margin-right: 4px;
    }
    
    .brand-name {
        max-width: 60px;
    }
}

/* 品牌筛选激活状态增强 */
.brand-filter-item.active {
    box-shadow: 0 2px 8px rgba(255,87,34,0.3);
}

/* 品牌筛选悬浮效果优化 */
.brand-filter-item:not(.active):hover .brand-name {
    color: white;
}

.brand-filter-item:not(.active):hover .brand-logo {
    border-color: white;
}