/* 产品页面样式 - 侧边栏布局版 */

.product-main {
    padding: 50px 0 80px;
    background: #f8f9fa;
}

/* 限制宽度并居中 */
.product-main .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

/* ========== 左右布局 ========== */
.product-layout {
    display: flex;
    gap: 30px;
}

/* 左侧侧边栏 */
.product-sidebar {
    width: 280px;
    flex-shrink: 0;
}

/* 右侧内容区 */
.product-content {
    flex: 1;
    min-width: 0;
}

/* ========== 侧边栏样式 ========== */
.product-sidebar-box {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
}

.product-sidebar-title {
    font-size: 17px;
    color: #333;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-sidebar-title i {
    color: #09b6aa;
}

/* 产品分类列表 */
.product-category-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.product-category-item {
    border-bottom: 1px solid #f5f5f5;
}

.product-category-item:last-child {
    border-bottom: none;
}

.product-category-main {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 0;
    color: #333;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s;
}

.product-category-main:hover,
.product-category-main.active {
    color: #09b6aa;
}

.product-category-main i {
    color: #09b6aa;
    font-size: 18px;
}

/* 子分类 */
.product-category-sub {
    padding-left: 28px;
    padding-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.product-category-sub a {
    font-size: 13px;
    color: #666;
    text-decoration: none;
    padding: 6px 0;
    transition: all 0.3s;
    position: relative;
    padding-left: 12px;
}

.product-category-sub a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    background: #ccc;
    border-radius: 50%;
    transition: all 0.3s;
}

.product-category-sub a:hover,
.product-category-sub a.active {
    color: #09b6aa;
}

.product-category-sub a:hover::before,
.product-category-sub a.active::before {
    background: #09b6aa;
}

/* 侧边栏联系区 */
.product-sidebar-contact p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 14px;
    color: #555;
}

.product-sidebar-contact p i {
    color: #09b6aa;
}

.product-sidebar-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: #09b6aa;
    color: #fff;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    font-size: 15px;
    margin-top: 15px;
    transition: all 0.3s;
}

.product-sidebar-btn:hover {
    background: #08a89d;
    color:#fff;
}

/* ========== 产品头部 ========== */
.product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 25px;
    border-bottom: 2px solid #e8e8e8;
    flex-wrap: wrap;
    gap: 20px;
}

.product-header h1 {
    font-size: 28px;
    color: #333;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 15px;
}

.product-count {
    font-size: 15px;
    color: #888;
    font-weight: normal;
}

/* 产品搜索框 */
.product-search {
    display: flex;
    align-items: center;
}

.product-search input {
    width: 260px;
    height: 48px;
    padding: 0 20px;
    border: 2px solid #e0e0e0;
    border-right: none;
    border-radius: 25px 0 0 25px;
    font-size: 14px;
    outline: none;
    background: #fff;
    transition: all 0.3s;
}

.product-search input:focus {
    border-color: #09b6aa;
}

.product-search button {
    height: 48px;
    padding: 0 25px;
    background: linear-gradient(135deg, #09b6aa 0%, #07a095 100%);
    border: none;
    border-radius: 0 25px 25px 0;
    color: #fff;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
}

.product-search button:hover {
    background: linear-gradient(135deg, #08a89d 0%, #069188 100%);
}

/* ========== 子类筛选 ========== */
.subcategory-filter {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    padding: 15px 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    flex-wrap: wrap;
}

.filter-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
    white-space: nowrap;
}

.filter-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-tag {
    padding: 8px 18px;
    background: #f5f5f5;
    border-radius: 20px;
    font-size: 13px;
    color: #555;
    text-decoration: none;
    transition: all 0.3s;
    border: 1px solid transparent;
}

.filter-tag:hover {
    background: #e8f5f4;
    color: #09b6aa;
    border-color: #09b6aa;
}

.filter-tag.active {
    background: #09b6aa;
    color: #fff;
    border-color: #09b6aa;
}

/* ========== 产品网格 ========== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 35px;
}

.product-card {
    display: block;
    text-decoration: none;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #eaeaea;
    transition: all 0.4s ease;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.12);
    border-color: #ddd;
}

.product-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 12px;
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.product-tag.hot {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
    box-shadow: 0 4px 15px rgba(255,107,107,0.35);
}

.product-tag.new {
    background: linear-gradient(135deg, #09b6aa 0%, #07a095 100%);
    box-shadow: 0 4px 15px rgba(9,182,170,0.35);
}

.product-tag.sale {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    box-shadow: 0 4px 15px rgba(243,156,18,0.35);
}

.product-info {
    padding: 25px 20px 30px;
    text-align: center;
}

.product-title {
    font-size: 18px;
    color: #333;
    font-weight: 600;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 54px;
}

.product-subtitle {
    font-size: 14px;
    color: #999;
    line-height: 1.6;
}

/* ========== 分页 ========== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 70px;
}

.page-item {
    min-width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    font-size: 15px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s;
}

.page-item:hover {
    border-color: #09b6aa;
    color: #09b6aa;
    transform: translateY(-3px);
}

.page-item.active {
    background: linear-gradient(135deg, #09b6aa 0%, #07a095 100%);
    border-color: #09b6aa;
    color: #fff;
    box-shadow: 0 6px 20px rgba(9,182,170,0.3);
}

/* ========== 响应式 ========== */
@media (max-width: 1199px) {
    .product-main .container {
        padding: 0 25px;
    }
    
    .product-sidebar {
        width: 260px;
    }
    
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
    
    .product-image {
        height: 200px;
    }
}

@media (max-width: 991px) {
    .product-main {
        padding: 40px 0 60px;
    }
    
    /* 991px以下：隐藏侧边栏 */
    .product-sidebar {
        display: none;
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .product-image {
        height: 200px;
    }
    
    .product-header h1 {
        font-size: 22px;
    }
}

@media (max-width: 767px) {
    .product-main {
        padding: 30px 0 50px;
    }
    
    .product-main .container {
        padding: 0 20px;
    }
    
    .product-sidebar {
        display: none;
    }
    
    .product-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 15px;
        margin-bottom: 30px;
        padding-bottom: 20px;
    }
    
    .product-header h1 {
        font-size: 20px;
    }
    
    .product-search input {
        width: 200px;
        height: 42px;
    }
    
    .product-search button {
        height: 42px;
    }
    
    .subcategory-filter {
        padding: 12px 15px;
        margin-bottom: 20px;
    }
    
    .filter-label {
        font-size: 13px;
    }
    
    .filter-tag {
        padding: 6px 14px;
        font-size: 12px;
    }
    
    .product-grid {
        gap: 15px;
    }
    
    .product-image {
        height: 180px;
    }
    
    .product-info {
        padding: 18px 15px 22px;
    }
    
    .product-title {
        font-size: 15px;
        min-height: 44px;
    }
    
    .product-subtitle {
        font-size: 13px;
    }
    
    .pagination {
        margin-top: 40px;
    }
    
    .page-item {
        min-width: 42px;
        height: 42px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .product-main .container {
        padding: 0 15px;
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .product-image {
        height: 150px;
    }
    
    .product-info {
        padding: 15px 12px 18px;
    }
    
    .product-title {
        font-size: 14px;
        min-height: 40px;
        margin-bottom: 6px;
    }
    
    .product-subtitle {
        font-size: 12px;
    }
    
    .product-tag {
        padding: 5px 10px;
        font-size: 10px;
    }
}
