/* 商品页面基础样式 */

/* 产品中心横幅样式 */
.goods-banner {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    margin-bottom: 30px;
}

.banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.goods-banner:hover .banner-img {
    transform: scale(1.05);
}

.banner-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    z-index: 2;
}

.banner-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: fadeInUp 0.8s ease;
}

.banner-subtitle {
    font-size: 20px;
    font-weight: 400;
    opacity: 0.9;
    letter-spacing: 1px;
    animation: fadeInUp 1s ease 0.2s both;
}

/* 渐入动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 背景遮罩 */
.goods-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.5));
    z-index: 1;
}
.goods-cate-nav {
    width: 100%;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 20px;
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

.goods-cate-nav:hover {
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.12);
}

.goods-cate-nav-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #2c3e50;
    padding-bottom: 15px;
    border-bottom: 3px solid #3498db;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.goods-cate-nav-item {
    display: block;
    padding: 12px 20px;
    margin-bottom: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 15px;
    font-weight: 500;
    position: relative;
    color: #34495e;
    border: 1px solid transparent;
}

/* 分类项内边距调整 */
.goods-cate-nav-item.level-1 {
    padding-right: 35px;
    font-size: 16px;
    font-weight: 600;
}

.goods-cate-nav-item.level-2 {
    padding-left: 40px;
    background-color: #f8fafc;
    font-size: 14px;
    margin-bottom: 6px;
    color: #64748b;
}

.goods-cate-nav-item:hover {
    background-color: #f1f5f9;
    color: #3498db;
    border-color: #e2e8f0;
    transform: translateX(5px);
}

.goods-cate-nav-item.level-2:hover {
    background-color: #e2e8f0;
    transform: translateX(8px);
}

.goods-cate-nav-item.active {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
    transform: translateX(5px);
    border-color: #3498db;
}

/* 展开/折叠图标 */
.cate-expand-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    transition: all 0.3s ease;
    color: #94a3b8;
}

.cate-expand-icon.expanded {
    transform: translateY(-50%) rotate(90deg);
    color: #3498db;
}

/* 子分类容器 */
.cate-children {
    display: none;
    margin-left: 20px;
    margin-top: -4px;
    animation: fadeIn 0.3s ease;
}

.cate-children.show {
    display: block;
}

/* 淡入动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 商品页面二级导航样式 */
.goods-secondary-nav {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    border: 1px solid #e2e8f0;
}

/* 面包屑导航样式 */
.goods-breadcrumb {
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
}

.goods-breadcrumb a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.3s ease;
}

.goods-breadcrumb a:hover {
    color: #3498db;
    text-decoration: underline;
}

.goods-breadcrumb .current-cate {
    color: #2c3e50;
    font-weight: 600;
}

/* 排序功能样式 */
.goods-sort {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 15px;
}

.sort-label {
    font-size: 14px;
    color: #34495e;
    font-weight: 500;
}

.sort-options {
    display: flex;
    gap: 10px;
}

.sort-btn {
    padding: 8px 16px;
    border: 2px solid #e2e8f0;
    background-color: #f8fafc;
    color: #64748b;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.sort-btn:hover {
    background-color: #e2e8f0;
    border-color: #cbd5e1;
    color: #34495e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.sort-btn.active {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border-color: #3498db;
    color: white;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* 商品列表样式 */
.goods-list {
    width: 100%;
}

.goods-item {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid #e2e8f0;
}

.goods-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border-color: #3498db;
}

.goods-item-img {
    position: relative;
    overflow: hidden;
    padding-top: 75%; /* 4:3 比例 */
    background: #f8fafc;
}

.goods-item-img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    border-radius: 12px 12px 0 0;
}

.goods-item:hover .goods-item-img img {
    transform: scale(1.1);
}

/* 添加图片悬停遮罩效果 */
.goods-item-img::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.goods-item:hover .goods-item-img::after {
    opacity: 1;
}

.goods-item-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.goods-item-name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #2c3e50;
    line-height: 1.5;
    height: 3.0em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.3s ease;
}

.goods-item:hover .goods-item-name {
    color: #3498db;
}

.goods-item-desc {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 16px;
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.6;
}

.goods-item-price {
    font-size: 24px;
    font-weight: 800;
    color: #e74c3c;
    margin-bottom: 12px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* 添加购买按钮 */
.goods-item-action {
    display: flex;
    justify-content: center;
}

.goods-item-button {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.goods-item-button:hover {
    background: linear-gradient(135deg, #2980b9 0%, #1f6f99 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

/* 响应式调整 - 商品二级导航 */
@media (max-width: 992px) {
    .goods-secondary-nav {
        padding: 15px;
        margin-bottom: 25px;
    }
    
    .goods-breadcrumb {
        font-size: 13px;
    }
    
    .goods-sort {
        justify-content: flex-start;
        margin-top: 15px;
        gap: 10px;
    }
    
    .sort-options {
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .sort-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
}

/* 手机端响应式样式 - 商品二级导航 */
@media (max-width: 768px) {
    .goods-secondary-nav {
        padding: 12px;
    }
    
    .goods-breadcrumb {
        font-size: 12px;
    }
    
    .goods-sort {
        gap: 8px;
    }
    
    .sort-label {
        font-size: 13px;
    }
    
    .sort-btn {
        padding: 5px 10px;
        font-size: 12px;
        border-radius: 6px;
    }
}

/* 响应式调整 */
@media (max-width: 992px) {
    /* 在平板上的样式 */
    .container {
        padding: 0 20px;
    }
    
    .goods-cate-nav {
        background: white;
        padding: 20px;
        margin-bottom: 30px;
        border-radius: 12px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    }
    
    .goods-cate-nav-title {
        display: block;
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    /* 平板上分类导航保持垂直 */
    .goods-cate-nav-item {
        display: block;
        padding: 10px 15px;
        margin-right: 0;
        margin-bottom: 6px;
        font-size: 14px;
    }
    
    .goods-cate-nav-item.level-1 {
        padding-right: 30px;
        font-size: 15px;
    }
    
    .goods-cate-nav-item.level-2 {
        padding-left: 35px;
        font-size: 13px;
    }
    
    .goods-list-row .col-lg-4 {
        margin-bottom: 25px;
    }
}

/* 手机端响应式样式 */
@media (max-width: 768px) {
    .container {
        margin-top: 70px !important;
        padding: 0 15px;
    }
    
    /* 分类导航优化 */
    .goods-cate-nav {
        margin-bottom: 25px;
        background-color: #fff;
        border-radius: 12px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
        padding: 15px;
    }
    
    .goods-cate-nav-title {
        font-size: 18px;
        font-weight: 700;
        padding: 0 0 10px 0;
        margin-bottom: 15px;
        color: #2c3e50;
        border-bottom: 2px solid #3498db;
    }
    
    .goods-cate-nav-item {
        padding: 12px 18px;
        font-size: 15px;
        border-radius: 8px;
        margin-bottom: 6px;
        transition: all 0.3s ease;
    }
    
    .goods-cate-nav-item.level-1 {
        padding-right: 35px;
        font-weight: 600;
        font-size: 15px;
    }
    
    .goods-cate-nav-item.level-2 {
        padding-left: 35px;
        font-size: 14px;
        background-color: #f8fafc;
    }
    
    .cate-expand-icon {
        right: 15px;
        font-size: 14px;
        width: 16px;
        height: 16px;
        text-align: center;
    }
    
    .cate-children {
        margin-left: 0;
        margin-top: 5px;
        padding-left: 10px;
    }
    
    /* 商品列表优化 */
    .goods-list {
        margin-top: 10px;
    }
    
    .goods-list-row {
        margin-left: -10px;
        margin-right: -10px;
    }
    
    .col-lg-4.col-md-6.col-sm-6.mb-4 {
        padding-left: 10px;
        padding-right: 10px;
        margin-bottom: 25px !important;
    }
    
    .goods-item {
        border-radius: 12px;
        overflow: hidden;
        transition: all 0.3s ease;
    }
    
    .goods-item-img {
        padding-top: 85%; /* 调整图片比例更适合手机 */
    }
    
    .goods-item-info {
        padding: 18px;
    }
    
    .goods-item-name {
        font-size: 17px;
        font-weight: 700;
        margin-bottom: 10px;
        line-height: 1.5;
        height: 3.0em;
        -webkit-line-clamp: 2;
    }
    
    .goods-item-desc {
        font-size: 14px;
        color: #64748b;
        line-height: 1.6;
        margin-bottom: 12px;
        height: 3.2em;
        -webkit-line-clamp: 2;
    }
    
    /* 按钮和交互优化 */
    .goods-item:hover {
        transform: translateY(-5px);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    }
    
    /* 价格样式优化 */
    .goods-item-price {
        font-size: 22px;
        font-weight: 700;
        color: #e74c3c;
    }
    
    /* 分页优化 */
    #pagination {
        margin-top: 40px;
        padding: 15px;
    }
    
    .pagination .page-link {
        padding: 8px 14px;
        font-size: 14px;
        min-width: 40px;
    }
}

/* 清除浮动 */
.cate-nav-list:after {
    content: "";
    display: table;
    clear: both;
}

/* 分页样式 */
#pagination {
    margin-top: 50px;
    padding: 20px 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.pagination {
    display: flex;
    justify-content: center;
    padding-left: 0;
    list-style: none;
    border-radius: 0.5rem;
    margin: 0;
}

.pagination .page-item {
    margin: 0 4px;
}

.pagination .page-link {
    position: relative;
    display: block;
    padding: 10px 18px;
    line-height: 1.5;
    color: #64748b;
    background-color: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 15px;
    font-weight: 500;
    min-width: 45px;
    text-align: center;
}

.pagination .page-link:hover {
    color: #3498db;
    text-decoration: none;
    background-color: #e2e8f0;
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.pagination .page-item.active .page-link {
    z-index: 1;
    color: #fff;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border-color: #3498db;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
    transform: translateY(-2px);
}

/* 加载状态样式 */
#goodsList .text-center.py-5 {
    padding: 60px 20px !important;
    text-align: center;
    color: #64748b;
    font-size: 16px;
}

/* 空状态样式 */
#emptyGoods {
    padding: 80px 20px !important;
    text-align: center;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

#emptyGoods p.text-muted {
    font-size: 18px;
    color: #94a3b8;
    margin-bottom: 0;
}