/* 服务页面特有样式 */

/* 内容左右布局 */
.content-layout {
    display: flex;
    height: calc(100vh - 180px); /* 减去顶部导航(50px)、搜索栏(约65px)、底部导航(60px)等高度 */
    /* gap: 12px; */
}

.left-category {
    width: 30%;
    background-color: #f5f5f5;
    /* height: calc(100vh - 110px); */
    overflow-y: auto;
    padding: 0;
}

.right-product-list {
    width: 70%; /* 调整右侧宽度以配合左侧 */
    background: white;
    /* border-radius: 8px; */
    padding: 0px;
    /*box-shadow: 0 2px 6px rgba(0,0,0,0.1);*/
    overflow-y: auto;
}

/* 分类项样式 - 类似美团外卖样式 */
.category-item {
    padding: 16px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    background-color: #f5f5f5;
    border: none;
    border-radius: 0;
    margin: 0;
    border-left: 3px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.category-item:hover {
    background-color: #ebebeb;
}

.category-item.active {
    background-color: white;
    color: #336df3;
    border-left: 3px solid #336df3;
    font-weight: bold;
}

.category-item {
    position: relative;
}

.category-item::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 1px;
    background-color: #e0e0e0;
    transform: scaleX(0.5);
}

.category-item span {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

.category-item.active span {
    color: #336df3;
    font-weight: 500;
}

.category-item:not(.active) {
    color: #666;
}

/* 商品项样式 */
.product-item {
    display: flex;
    margin-bottom: 12px; /* 减少底部间距 */
    padding: 12px;
    /* border: 1px solid #e0e0e0; */
    border-radius: 8px;
    transition: all 0.3s;
}

.product-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px); /* 微微上移效果 */
    border-color: #336df3; /* 悬停时边框变为蓝色 */
    background-color: white; /* 悬停时背景变为白色 */
}

.product-image {
    width: 100px;
    height: 100px;
    border-radius: 4px;
    margin-right: 10px;
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-info {
    flex: 1;
}

.product-name {
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

.product-desc {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.product-price {
    color: #ff6b35;
    font-weight: bold;
    margin-top: 8px;
    margin-bottom: 8px;
    font-size: 16px;
}

.buy-button {
    background-color: #336df3;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    float: right;
}

/* 服务类别卡片样式 */
.service-category {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.service-category h3 {
    margin: 0 0 10px 0;
    color: #336df3;
    font-size: 16px;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.service-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.service-list li {
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
    display: flex;
    align-items: center;
}

.service-list li:last-child {
    border-bottom: none;
}

.service-icon {
    width: 40px;
    height: 40px;
    background: #f0f8ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    color: #336df3;
    font-size: 18px;
}

.service-text {
    flex: 1;
    color: #333;
}

.service-arrow {
    color: #ccc;
    font-size: 12px;
}

/* 客服聊天窗口样式 */
.chat-window {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.chat-header {
    text-align: center;
    margin-bottom: 15px;
    color: #336df3;
    font-weight: bold;
}

.chat-messages {
    height: 200px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 15px;
}

.message-item {
    margin-bottom: 10px;
    padding: 8px;
    border-radius: 4px;
    max-width: 80%;
}

.message-item.user {
    background: #e3f2fd;
    margin-left: auto;
}

.message-item.system {
    background: #f5f5f5;
    margin-right: auto;
}

/* 服务详情样式 */
.service-detail {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.service-detail p {
    line-height: 1.6;
    color: #666;
}

/* 快速服务按钮组 */
.quick-services {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.quick-service-btn {
    background: white;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    padding: 15px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.quick-service-btn:hover {
    border-color: #336df3;
    box-shadow: 0 2px 8px rgba(30, 159, 255, 0.2);
}

.quick-service-icon {
    font-size: 24px;
    color: #336df3;
    margin-bottom: 5px;
}

.quick-service-text {
    font-size: 14px;
    color: #333;
}
