/* 分类页面样式 */
.category-page {
    display: flex;
    min-height: calc(100vh - 110px);
    background: #f5f5f5;
}

/* 左侧分类导航 */
.category-sidebar {
    width: 90px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid #eee;
    overflow-y: auto;
    position: sticky;
    top: 50px;
    height: calc(100vh - 110px);
}

.category-list {
    padding: 0;
}

.category-item {
    padding: 15px 10px;
    text-align: center;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: all 0.2s;
    position: relative;
}

.category-item.active {
    background: #FDF8F0;
    color: #B5975F;
    border-left-color: #B5975F;
    font-weight: 600;
}

.category-item:hover {
    background: #f9f9f9;
}

.category-item span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 右侧商品展示 */
.category-content {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
}

.goods-section {
    display: none;
}

.goods-section:first-child {
    display: block;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.section-header h2 {
    font-size: 16px;
    color: #333;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
}

.section-header h2::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 18px;
    background: linear-gradient(180deg, #D4C5A9 0%, #C9A86C 100%);
    margin-right: 10px;
    border-radius: 2px;
}

.view-all {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #999;
    font-size: 12px;
    text-decoration: none;
}

.view-all:hover {
    color: #B5975F;
}

/* 商品网格 */
.goods-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.goods-card {
    display: block;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.goods-image {
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: hidden;
}

.goods-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #FFFBF5;
}

.discount-tag {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #D4C09A;
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 600;
}

.goods-info {
    padding: 10px;
}

.goods-name {
    font-size: 13px;
    color: #333;
    margin: 0 0 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
    height: 36px;
}

.goods-price {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex: 1;
}

/* 价格和爱心包装器 */
.goods-price-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 爱心图标 */
.heart-icon {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.heart-icon svg {
    width: 100%;
    height: 100%;
    color: #C9A86C;
    transition: all 0.3s ease;
}

.heart-icon svg .heart-circle {
    fill: none;
    stroke: #C9A86C;
    stroke-width: 1;
    transition: all 0.3s ease;
}

.heart-icon svg .heart-path {
    fill: none;
    stroke: #C9A86C;
    stroke-width: 1;
    transition: all 0.3s ease;
}

.heart-icon:hover svg {
    transform: scale(1.1);
}

.heart-icon:hover svg .heart-circle,
.heart-icon:hover svg .heart-path {
    stroke: #B5975F;
}

/* 已收藏状态 */
.heart-icon.liked svg .heart-circle {
    fill: none;
    stroke: #C9A86C;
}

.heart-icon.liked svg .heart-path {
    fill: #C9A86C;
    stroke: #C9A86C;
}

.heart-icon.liked:hover svg .heart-circle {
    stroke: #B5975F;
}

.heart-icon.liked:hover svg .heart-path {
    fill: #B5975F;
    stroke: #B5975F;
}

.original-price {
    font-size: 11px;
    color: #999;
    text-decoration: line-through;
}

.selling-price {
    font-size: 15px;
    color: #B5975F;
    font-weight: 600;
}

/* 空状态 */
.empty-goods {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 14px;
}

/* 滚动条样式 */
.category-sidebar::-webkit-scrollbar {
    width: 0;
}

/* 响应式 */
@media (max-width: 360px) {
    .category-sidebar {
        width: 80px;
    }

    .category-item {
        font-size: 12px;
        padding: 12px 8px;
    }

    .goods-grid {
        grid-template-columns: 1fr;
    }
}
