/* ==================== 生活信息详情页 ==================== */

/* 主体区域 */
.life-main {
    padding: 20px 0 40px;
    background: #fff;
}

.life-main .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 两栏布局 */
.life-layout {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 20px;
}

/* 左侧内容区 */
.life-left {
    min-width: 0;
}

/* 标题区 */
.detail-header {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 15px;
}

.detail-title {
    font-size: 30px;
    font-weight: 700;
    color: #333;
    line-height: 1.5;
    margin-bottom: 12px;
}

.detail-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #999;
}

/* 详情内容区 */
.detail-content {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 4px;
    padding: 20px;
}

/* 信息行 */
.detail-info {
    margin-bottom: 20px;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 14px;
}

.info-label {
    color: #666;
    white-space: nowrap;
    min-width: 70px;
}

.info-value {
    color: #333;
}

/* 操作按钮 */
.detail-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.btn-contact {
    padding: 12px 30px;
    background: #ff6a00;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-contact:hover {
    background: #e65c00;
}

.btn-chat {
    padding: 12px 30px;
    background: #fff;
    color: #666;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-chat:hover {
    border-color: #ff6a00;
    color: #ff6a00;
}

/* 顶部区域：图片+信息并排 */
.detail-top {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

/* 图片展示 */
.detail-gallery {
    flex: 0 0 400px;
}

.gallery-main {
    width: 400px;
    height: 300px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-thumbs {
    display: flex;
    gap: 8px;
}

.gallery-thumbs img {
    width: 72px;
    height: 54px;
    border-radius: 4px;
    cursor: pointer;
    object-fit: cover;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.gallery-thumbs img:hover,
.gallery-thumbs img.active {
    border-color: #ff6a00;
}

/* 信息面板 */
.detail-info-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 10px;
}

.detail-info-panel .detail-info {
    margin-bottom: 20px;
}

.detail-info-panel .detail-actions {
    flex-direction: column;
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
    gap: 10px;
}

.detail-info-panel .btn-contact,
.detail-info-panel .btn-chat {
    width: 100%;
    justify-content: center;
}

/* 服务描述 */
.detail-desc {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.desc-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    padding-left: 10px;
    border-left: 3px solid #ff6a00;
}

.desc-content {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
}

.desc-content p {
    margin-bottom: 10px;
}

/* 广告区 */
.detail-ads {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.ad-item {
    border-radius: 4px;
    overflow: hidden;
}

.ad-item img {
    width: 100%;
    height: auto;
    display: block;
}

/* 更多图片 */
.detail-images {
    margin-bottom: 20px;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 10px;
}

.image-grid img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.image-grid img:hover {
    transform: scale(1.05);
}

/* 猜你喜欢 */
.recommend-section {
    margin-top: 20px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.section-title i {
    color: #ff6a00;
    font-size: 18px;
}

.recommend-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.recommend-item {
    display: block;
    border: 1px solid #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.recommend-item:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    border-color: #ff6a00;
}

.rec-img {
    width: 100%;
    height: 120px;
    overflow: hidden;
}

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

.rec-title {
    font-size: 13px;
    color: #333;
    padding: 8px 10px 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rec-meta {
    font-size: 12px;
    color: #999;
    padding: 0 10px 10px;
}

/* ==================== 右侧边栏 ==================== */
.life-right {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* 用户卡片 */
.user-card {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 4px;
    padding: 20px;
    text-align: center;
}

.user-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 12px;
    border: 2px solid #f0f0f0;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-name {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.user-verify {
    font-size: 12px;
    color: #4caf50;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.user-time {
    font-size: 12px;
    color: #999;
    margin-bottom: 15px;
}

.user-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.btn-follow,
.btn-home {
    padding: 8px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    background: #fff;
    color: #666;
}

.btn-follow:hover,
.btn-home:hover {
    border-color: #ff6a00;
    color: #ff6a00;
}

/* 侧边栏区块 */
.sidebar-section {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 4px;
    padding: 15px;
}

.sidebar-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sidebar-title i {
    color: #ff6a00;
}

.sidebar-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-item {
    display: flex;
    gap: 10px;
    transition: all 0.3s ease;
}

.sidebar-item:hover .side-title {
    color: #ff6a00;
}

.side-img {
    width: 100px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

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

.side-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.side-title {
    font-size: 13px;
    color: #333;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.3s ease;
}

.side-meta {
    font-size: 12px;
    color: #999;
}

/* 侧边栏广告 */
.sidebar-ad {
    border-radius: 4px;
    overflow: hidden;
}

.sidebar-ad img {
    width: 100%;
    height: auto;
    display: block;
}

/* ==================== 返回顶部 ==================== */
.back-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 40px;
    height: 40px;
    background: #ff6a00;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    display: none;
    z-index: 1000;
    transition: all 0.3s ease;
}

.back-top:hover {
    background: #e65c00;
}

/* ==================== 响应式适配 ==================== */
@media (max-width: 1024px) {
    .life-layout {
        grid-template-columns: 2.5fr 1fr;
    }

    .recommend-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .image-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .detail-top {
        flex-direction: column;
    }

    .detail-gallery {
        flex: 1;
    }

    .gallery-main {
        width: 100%;
        max-width: 400px;
    }

    .detail-info-panel {
        padding-top: 0;
    }

    .detail-info-panel .detail-actions {
        flex-direction: row;
    }

    .detail-info-panel .btn-contact,
    .detail-info-panel .btn-chat {
        width: auto;
    }
}

@media (max-width: 900px) {
    .life-layout {
        grid-template-columns: 1fr;
    }

    .life-right {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .sidebar-ad {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .detail-title {
        font-size: 18px;
    }

    .detail-ads {
        grid-template-columns: 1fr;
    }

    .image-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .recommend-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .life-right {
        grid-template-columns: 1fr;
    }

    .sidebar-ad {
        grid-column: span 1;
    }

    .detail-top {
        flex-direction: column;
    }

    .gallery-main {
        width: 100%;
        height: 250px;
    }

    .detail-info-panel .detail-actions {
        flex-direction: row;
    }
}

@media (max-width: 480px) {
    .detail-header,
    .detail-content {
        padding: 15px;
    }

    .detail-title {
        font-size: 16px;
    }

    .gallery-main {
        height: 200px;
    }

    .image-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .image-grid img {
        height: 100px;
    }

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

    .detail-actions {
        flex-direction: column;
    }

    .btn-contact,
    .btn-chat {
        width: 100%;
        justify-content: center;
    }

    .detail-info-panel .detail-actions {
        flex-direction: column;
    }

    .detail-info-panel .btn-contact,
    .detail-info-panel .btn-chat {
        width: 100%;
    }
}
