/* 重置样式 - 修改为更具体的选择器，避免影响导航 */
.product-content * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: #fff;
}

/* 产品中心头部 */
.product-header {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../images/header-bg.jpg') no-repeat center center;
    background-color: #2c3e50;
    background-size: cover;
    height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    margin-top: 60px;
}

.product-header h1 {
    font-size: 36px;
    margin-bottom: 10px;
}

.product-header p {
    font-size: 24px;
}

/* 主容器布局 */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 30px;
    position: relative;
}

.content-wrapper {
    flex: 1;
    min-width: 0;
    position: relative;
}

/* 产品列表容器 */
.product-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* 产品卡片样式 */
.product-item {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* 图片容器 */
.product-item .image-wrapper {
    position: relative;
    overflow: hidden;
}

.product-item img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    padding: 10px;
    transition: all 0.5s ease;
}

/* 图片悬停效果 */
.product-item:hover img {
    transform: scale(1.1);
}

/* 悬停遮罩层 */
.product-item .image-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0);
    transition: all 0.3s ease;
}

.product-item:hover .image-wrapper::after {
    background: rgba(0,0,0,0.1);
}

/* 查看详情按钮效果 */
.product-item a.detail-link {
    display: inline-block;
    padding: 8px 20px;
    color: #666;
    text-decoration: none;
    border: 1px solid #ddd;
    margin: 10px 0;
    font-size: 14px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.product-item a.detail-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: #ff6600;
    transition: all 0.3s ease;
    z-index: -1;
}

.product-item:hover a.detail-link {
    color: white;
    border-color: #ff6600;
}

.product-item:hover a.detail-link::before {
    left: 0;
}

.product-item h3 {
    padding: 10px;
    margin: 0;
    font-size: 16px;
    color: #333;
    font-weight: normal;
}

.product-item-category {
    display: none; /* 原来的 product-category 样式 */
}

.product-item a {
    display: inline-block;
    padding: 5px 20px;
    color: #666;
    text-decoration: none;
    border: 1px solid #ddd;
    margin: 10px 0;
    font-size: 14px;
}

.product-item a:hover {
    color: #333;
    border-color: #999;
}

/* 侧边栏样式 */
.sidebar {
    width: 240px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.category-box {
    background: #fff;
}

.category-box h2 {
    padding: 15px;
    margin: 0;
    font-size: 18px;
    color: #333;
    border-bottom: 2px solid #ff6600;
}

.category-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.category-list li {
    border-bottom: 1px solid #eee;
}

.category-list a {
    display: block;
    padding: 12px 15px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
}

.category-list a:hover {
    color: #ff6600;
}

/* 响应式调整 */
@media (max-width: 992px) {
    .product-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        margin-bottom: 20px;
    }
    
    .product-container {
        grid-template-columns: repeat(1, 1fr);
    }
}

/* 后台管理样式 */
.admin-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.admin-table th,
.admin-table td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: left;
}

.admin-table th {
    background: #f5f5f5;
}

.admin-btn {
    display: inline-block;
    padding: 8px 15px;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    margin-right: 10px;
}

.admin-btn.delete {
    background: #dc3545;
}

/* 调整产品网格容器 */
.product-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

/* 响应式调整 */
@media (max-width: 992px) {
    .main-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        margin-bottom: 30px;
    }
    
    .category-list {
        display: flex;
        flex-wrap: wrap;
    }
    
    .category-list li {
        flex: 1 1 auto;
        border-bottom: none;
        border-right: 1px solid #eee;
    }
    
    .category-list li:last-child {
        border-right: none;
    }
}

@media (max-width: 768px) {
    .main-container {
        padding: 0 15px;
    }
    
    .category-list {
        flex-direction: column;
    }
    
    .category-list li {
        border-right: none;
        border-bottom: 1px solid #eee;
    }
}

/* 修改侧边栏样式 */
.category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #eee;
}

.category-item a {
    flex: 1;
    padding: 12px 15px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
}

.toggle-btn {
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    cursor: pointer;
    color: #666;
    font-size: 16px;
    user-select: none;
}

.toggle-btn:hover {
    color: #ff6600;
}

.sub-category {
    display: none;
    list-style: none;
    background: #f9f9f9;
}

.sub-category li a {
    padding-left: 30px;
    font-size: 13px;
}

.sub-category.active {
    display: block;
}

/* 添加动画效果 */
.toggle-btn.active {
    transform: rotate(45deg);
}

.toggle-btn {
    transition: transform 0.3s ease;
}

/* 产品详情页样式 */
.product-detail {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.product-gallery {
    margin-bottom: 30px;
}

.gallery-main {
    margin-bottom: 15px;
    text-align: center;
    border: 1px solid #eee;
    padding: 10px;
    background: #fff;
}

.gallery-main img {
    max-width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
}

.gallery-thumbs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 5px;
}

.thumb-item {
    width: 80px;
    height: 80px;
    border: 2px solid #eee;
    cursor: pointer;
    transition: border-color 0.3s;
}

.thumb-item:hover,
.thumb-item.active {
    border-color: #ff6600;
}

.thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info .product-title {
    font-size: 24px;
    color: #333;
    margin: 0 0 15px;
}

.product-meta {
    color: #666;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.product-description {
    color: #666;
    line-height: 1.8;
    margin-bottom: 20px;
}

.product-content {
    color: #333;
    line-height: 1.8;
}

/* 相关产品样式 */
.related-products {
    margin-top: 30px;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.related-products h2 {
    font-size: 18px;
    color: #333;
    margin: 0 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ff6600;
}

.related-product-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.related-product-item {
    border: 1px solid #eee;
    padding: 10px;
    transition: all 0.3s ease;
}

.related-product-item:hover {
    border-color: #ddd;
    background: #f9f9f9;
}

.related-product-item a {
    text-decoration: none;
    color: inherit;
}

/* 右侧产品列表样式 */
.product-list-box {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.product-list-box h2 {
    font-size: 18px;
    color: #333;
    margin: 0 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ff6600;
}

.sidebar-items-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-items {
    border-bottom: 1px solid #eee;
}

.sidebar-items:last-child {
    border-bottom: none;
}

.sidebar-items a {
    display: block;
    padding: 12px 15px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.sidebar-items a:hover {
    color: #ff6600;
    background: #f9f9f9;
    padding-left: 20px;
}

/* 移除旧的产品列表样式 */
.sidebar .product-list {
    /* 改为更具体的选择器 */
    display: none;
}

.sidebar .product-item {
    /* 改为更具体的选择器 */
    display: none;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .related-product-list {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .sidebar .product-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .sidebar .product-thumb {
        height: 120px;
    }
} 