/* 纯手机端CSS样式 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.5;
    background-color: #f9fafb;
    color: #111827;
    min-height: 100vh;
    padding-bottom: 60px; /* 为底部导航留出空间 */
}

/* 隐藏滚动条 */
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

/* 头部样式 */
header {
    background-color: white;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 50;
    height: 4rem;
}

.header-container {
    width: 375px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.header-content {
    display: flex;
    align-items: center;
}

.header-logo {
    background-color: #2563eb;
    color: white;
    padding: 0.5rem;
    border-radius: 0.25rem;
    margin-right: 0.5rem;
}

.header-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
}

.header-button {
    background-color: #2563eb;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
}

.header-button:hover {
    background-color: #1d4ed8;
}

/* 轮播容器 */
.carousel-section {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    color: white;
    position: relative;
    overflow: hidden;
    padding: 1.5rem 0;
    width: 375px;
    margin: 0 auto;
}

.carousel-container {
    position: relative;
    overflow: hidden;
    border-radius: 0.75rem;
    height: 160px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-item {
    min-width: 50%;
    flex-direction: column;
    justify-content: center;
    padding: 0.75rem;
    height: 100%;
}

.carousel-item.bg-gradient-blue {
    background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%);
}

.carousel-item.bg-white {
    background: white;
    color: #111827;
}

.carousel-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.carousel-title {
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.carousel-description {
    color: #dbeafe;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.carousel-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.grid-item {
    text-align: center;
}

.grid-number {
    font-size: 1.125rem;
    font-weight: 700;
    color: #2563eb;
}

.grid-label {
    font-size: 0.625rem;
    color: #4b5563;
    margin-top: 0.125rem;
}

.carousel-buttons {
    display: flex;
    gap: 0.75rem;
}

.carousel-button {
    background-color: #eab308;
    color: #1e3a8a;
    padding: 0.625rem 1.5rem;
    border-radius: 0.25rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    flex: 1;
}

.carousel-button:hover {
    background-color: #fbbf24;
}

/* 轮播指示器 */
.carousel-indicators {
    position: absolute;
    bottom: 1rem;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
}

.indicator.active {
    background-color: white;
}

/* 城市选择 */
.cities-section {
    width: 375px;
    margin: 5px auto;
    padding: 2px;
}

.cities-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.cities-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.cities-more {
    color: #2563eb;
    text-decoration: none;
    font-size: 0.875rem;
}

.cities-container {
    display: flex;
    overflow-x: auto;
    gap: 0.5rem;
    padding: 0.5rem 0;
    margin: 0 0 2px 0;
    padding-left: 0;
    padding-right: 0;
    /* 隐藏滚动条 */
    -ms-overflow-style: none;
    scrollbar-width: none;
    /* 允许拖动滚动 */
    cursor: grab;
    /* 启用移动设备触摸滚动 */
    -webkit-overflow-scrolling: touch;
    /* 确保内容可以滚动 */
    white-space: nowrap;
    /* 增加滚动区域宽度 */
    min-width: 100%;
}

.cities-container::-webkit-scrollbar {
    display: none;
}

.cities-container:active {
    cursor: grabbing;
}

.city-button {
    flex-shrink: 0;
    padding: 0.5rem 0.75rem;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 4rem;
}

.city-button.active {
    background-color: #dbeafe;
    border-color: #3b82f6;
    color: #2563eb;
}

/* 城市选择弹窗 */
.city-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 50;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
}

.city-popup.show {
    display: flex;
}

.city-popup-content {
    background-color: white;
    border-radius: 12px;
    width: 100%;
    max-width: 375px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.city-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.city-popup-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.city-popup-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #64748b;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.city-popup-close:hover {
    color: #1e293b;
}

.city-popup-body {
    padding: 1rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem;
    max-height: calc(80vh - 60px);
    overflow-y: auto;
}

.city-popup-body .city-button {
    flex: 0 0 calc(33.333% - 0.333rem);
    margin: 0;
    text-align: center;
}

/* 服务选项卡 */
.services-tabs {
    width: 375px;
    margin: 0 auto;
    padding: 3px;
}

.tabs-container {
    display: flex;
    overflow-x: auto;
    gap: 0.5rem;
    padding-bottom: 0;
    margin: 0;
    padding-left: 0;
    padding-right: 0;
    /* 隐藏滚动条 */
    -ms-overflow-style: none;
    scrollbar-width: none;
    /* 允许拖动滚动 */
    cursor: grab;
    /* 启用移动设备触摸滚动 */
    -webkit-overflow-scrolling: touch;
    /* 确保内容可以滚动 */
    white-space: nowrap;
}

.tabs-container::-webkit-scrollbar {
    display: none;
}

.tabs-container:active {
    cursor: grabbing;
}

.tab-btn {
    flex-shrink: 0;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.66rem;
    background-color: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background-color: #dbeafe;
    border-color: #3b82f6;
    padding: 5px;
}

.tab-icon {
    color: #2563eb;
    margin-bottom: 0.34rem;
}

.tab-text {
    font-size: 0.58rem;
    font-weight: 600;
    color: #2563eb;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* 服务卡片 */
.service-card {
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

/* 多图卡片（专车接送、共享办公） */
.multi-image-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* 专车接送卡片 - 左图右文布局 */
.zhuche-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.zhuche-card .image-gallery {
    width: 120px;
    flex-shrink: 0;
    display: block;
    gap: 0;
}

.zhuche-card .gallery-image {
    width: 120px;
    height: 120px;
}

.zhuche-card .service-content {
    flex: 1;
    max-height: none;
}

/* 标准卡片（社交娱乐、定制旅游、应急支援） */
.standard-card {
    display: block;
}

.service-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

.service-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.1rem;
}

.service-title {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
    line-height: 1.1;
}

.service-link {
    color: #2563eb;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.service-link svg {
    width: 12px;
    height: 12px;
    margin-left: 2px;
}

.service-description {
    color: #4b5563;
    margin-bottom: 0.1rem;
    font-size: 0.7rem;
    line-height: 1.1;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rating {
    display: flex;
    align-items: center;
    color: #f59e0b;
    margin-bottom: 0.1rem;
    font-size: 0.7rem;
    line-height: 1;
}

.rating svg {
    width: 14px;
    height: 14px;
    margin-right: 2px;
}

.price {
    font-size: 1rem;
    font-weight: 700;
    color: #2563eb;
    margin: 0.15rem 0;
    line-height: 1.1;
}

/* 评分和价格容器 */
.rating-price-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0.15rem 0;
}

.tags-container {
    margin-bottom: 0.1rem;
    display: flex;
    flex-wrap: nowrap;
    gap: 0.1rem;
}

.tag {
    font-size: 0.6rem;
    padding: 0.08rem 0.25rem;
    margin-right: 0.1rem;
}

.book-button {
    background-color: #2563eb;
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 0.25rem;
    font-size: 0.7rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin-top: auto;
    align-self: flex-start;
    line-height: 1.1;
    width: auto;
    min-width: 55px;
    text-align: center;
}

.book-button:hover {
    background-color: #1d4ed8;
}

.tags-container {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.1rem;
    margin-top: 0.1rem;
    overflow-x: auto;
    padding-bottom: 0.1rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tag {
    background-color: #eff6ff;
    color: #2563eb;
    padding: 0.08rem 0.25rem;
    border-radius: 9999px;
    font-size: 0.6rem;
    font-weight: 500;
}

.multi-image-card .image-gallery {
    width: 100%;
    display: flex;
    gap: 0.25rem;
    margin-top: 0;
}

.multi-image-card .gallery-image {
    width: 23%;
    height: 70px;
    object-fit: cover;
    border-radius: 0.5rem;
}

/* 服务卡片内容区域 */
.service-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    max-height: 120px;
}

/* 底部导航 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: white;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-around;
    height: 4rem;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    text-decoration: none;
}

.bottom-nav-item.active {
    color: #2563eb;
}

.bottom-nav-icon {
    width: 1.5rem;
    height: 1.5rem;
}

.bottom-nav-text {
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* 图片滚动容器 */
.image-scroll-container {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    margin-top: 1rem;
}

.image-scroll-container img {
    flex-shrink: 0;
    width: 6rem;
    height: 5rem;
    object-fit: cover;
    border-radius: 0.5rem;
}

/* 标签容器 */
.tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* 商务助手卡片样式 */
.service-section {
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.assistant-card {
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.restaurant-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.restaurant-card .image-gallery {
    width: 120px;
    flex-shrink: 0;
    display: block;
    gap: 0;
}

.restaurant-card .gallery-image {
    width: 120px;
    height: 120px;
}

.restaurant-list {
    margin-top: 1rem;
}

.reviews {
    font-size: 0.7rem;
    color: #6b7280;
}

.assistant-header {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    position: relative;
}

.assistant-avatar {
    width: 53px;
    height: 53px;
    object-fit: cover;
    border-radius: 50%;
    flex-shrink: 0;
}

.assistant-info {
    flex: 1;
    min-width: 0;
}

.assistant-name {
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.assistant-description {
    color: #4b5563;
    margin: 0.75rem 0 0;
    padding: 0.75rem 0 0;
    font-size: 0.875rem;
    line-height: 1.3;
    width: 100%;
    display: block;
    box-sizing: border-box;
    word-break: break-word;
    border-top: 1px solid #f3f4f6;
}

.assistant-price {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
    margin-top: 0;
    margin-left: auto;
    width: auto;
}

/* 自定义样式 */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 手机端布局样式 */
.container {
    width: 375px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* 服务分类按钮 */
.service-category {
    display: flex;
    overflow-x: auto;
    gap: 0.5rem;
    padding: 0.5rem 0;
    margin: 0 0 1rem 0;
    padding-left: 0;
    padding-right: 0;
}

.service-category button {
    flex-shrink: 0;
    padding: 1rem;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 6rem;
}

.service-category button.active {
    background-color: #dbeafe;
    border-color: #3b82f6;
    color: #2563eb;
}
