/* ==========================================
   房源详情页专属样式
   ========================================== */

/* 面包屑导航 */
.breadcrumb-bar {
    background: var(--bg-light);
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--text-light);
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb .sep {
    color: var(--text-muted);
}

.breadcrumb .current {
    color: var(--text);
}

/* 房源标题栏 */
.detail-header {
    background: #fff;
    padding: 24px 0;
    border-bottom: 1px solid var(--border);
}

.detail-header h1 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 12px;
}

.detail-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.detail-tags .tag {
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 4px;
    background: rgba(30,58,95,0.08);
    color: var(--primary);
}

.detail-tags .tag.rent {
    background: var(--accent);
    color: #fff;
}

/* 主体布局 */
.detail-main {
    background: var(--bg-light);
    padding: 24px 0 40px;
}

.detail-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
}

/* 图片轮播 */
.detail-gallery {
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.gallery-main {
    position: relative;
    height: 480px;
    overflow: hidden;
}

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

.gallery-prev,
.gallery-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.4);
    color: #fff;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-prev:hover,
.gallery-next:hover {
    background: rgba(0,0,0,0.6);
}

.gallery-prev {
    left: 16px;
}

.gallery-next {
    right: 16px;
}

.gallery-thumbs {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: #fff;
}

.gallery-thumbs .thumb {
    width: 100px;
    height: 66px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.6;
    transition: var(--transition);
    border: 2px solid transparent;
}

.gallery-thumbs .thumb:hover {
    opacity: 0.8;
}

.gallery-thumbs .thumb.active {
    opacity: 1;
    border-color: var(--primary);
}

/* 详情区块 */
.detail-section {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.detail-section .section-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}

/* 基本信息网格 */
.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px 24px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-item label {
    font-size: 13px;
    color: var(--text-muted);
}

.info-item span {
    font-size: 15px;
    color: var(--text);
    font-weight: 500;
}

.info-item .highlight {
    font-size: 18px;
    color: var(--accent);
    font-weight: 700;
}

/* 房源描述 */
.detail-desc {
    font-size: 15px;
    line-height: 1.9;
    color: var(--text-light);
}

.detail-desc p {
    margin-bottom: 12px;
}

.detail-desc strong {
    color: var(--text);
}

.detail-desc ul {
    margin-left: 20px;
    margin-top: 8px;
}

.detail-desc ul li {
    margin-bottom: 6px;
}

/* 配套设施 */
.facility-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.facility-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg-light);
    border-radius: var(--radius);
    font-size: 14px;
    color: var(--text);
}

.facility-item .icon {
    font-size: 20px;
}

/* 交通配套 */
.transport-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.transport-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.transport-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    min-width: 60px;
    flex-shrink: 0;
}

.transport-detail {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
}

.metro-tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    margin-right: 6px;
}

.metro-tag.line1 {
    background: #00b050;
}

.metro-tag.line2 {
    background: #c00000;
}

/* 周边配套 */
.surround-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.surround-card {
    background: var(--bg-light);
    padding: 20px;
    border-radius: var(--radius);
}

.surround-card h4 {
    font-size: 15px;
    margin-bottom: 8px;
    color: var(--text);
}

.surround-card p {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.6;
}

/* 右侧侧边栏 */
.detail-right {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.side-panel {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
}

/* 价格面板 */
.price-panel {
    text-align: center;
}

.price-main {
    margin-bottom: 4px;
}

.price-num {
    font-size: 36px;
    font-weight: 700;
    color: var(--accent);
}

.price-unit {
    font-size: 14px;
    color: var(--text-muted);
}

.price-sub {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 16px;
}

.price-tags {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.price-tags .tag {
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 4px;
    background: rgba(30,58,95,0.08);
    color: var(--primary);
}

.btn-appointment {
    background: var(--accent);
    color: #fff;
    border: none;
    width: 100%;
    padding: 14px;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 10px;
}

.btn-appointment:hover {
    background: #c0392b;
}

.btn-phone {
    background: #fff;
    color: var(--primary);
    border: 1px solid var(--primary);
    width: 100%;
    padding: 12px;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-phone:hover {
    background: var(--primary);
    color: #fff;
}

/* 顾问面板 */
.agent-panel h4 {
    font-size: 16px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}

.agent-info {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.agent-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.agent-meta p {
    margin-bottom: 2px;
}

.agent-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.agent-title {
    font-size: 13px;
    color: var(--text-light);
}

.agent-stats {
    font-size: 12px;
    color: var(--accent);
}

.agent-intro {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 16px;
}

.btn-chat {
    background: var(--primary);
    color: #fff;
    border: none;
    width: 100%;
    padding: 12px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-chat:hover {
    background: var(--primary-dark);
}

/* 楼盘信息面板 */
.building-panel h4 {
    font-size: 16px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}

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

.binfo-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.binfo-label {
    color: var(--text-muted);
}

.binfo-value {
    color: var(--text);
    font-weight: 500;
    text-align: right;
    max-width: 60%;
}

/* 相似推荐 */
.similar-section {
    background: #fff;
    padding: 40px 0;
    border-top: 1px solid var(--border);
}

.similar-section .section-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 24px;
}

.similar-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.similar-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

.similar-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}

.similar-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.similar-info {
    padding: 16px;
}

.similar-info h4 {
    font-size: 15px;
    margin-bottom: 6px;
}

.similar-info p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.similar-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
}

.similar-price span {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-muted);
}

/* 预约弹窗 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: #fff;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 480px;
    padding: 32px;
    position: relative;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal-overlay.show .modal {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text);
}

.modal h3 {
    font-size: 22px;
    margin-bottom: 6px;
}

.modal-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 14px;
    color: var(--text);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary);
}

.btn-submit {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 8px;
}

.btn-submit:hover {
    background: #c0392b;
}

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

    .detail-right {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .side-panel {
        flex: 1;
        min-width: 280px;
    }

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

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

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

@media (max-width: 768px) {
    .gallery-main {
        height: 260px;
    }

    .gallery-thumbs .thumb {
        width: 70px;
        height: 46px;
    }

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

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

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

    .detail-header h1 {
        font-size: 20px;
    }

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

    .price-num {
        font-size: 28px;
    }

    .modal {
        padding: 24px 20px;
    }
}
