/* 物件詳細頁面容器 */
.property-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* 左側主要內容區 */
.property-main {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* 圖片輪播區 */
.property-gallery {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.gallery-main {
    width: 100%;
    height: 500px;
    position: relative;
    overflow: hidden;
}

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

.gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.5rem;
    padding: 1rem;
}

.gallery-thumbs img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    transition: opacity 0.3s;
}

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

.gallery-thumbs img.active {
    border: 2px solid var(--secondary-color);
}

/* 物件資訊區 */
.property-info {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    height: fit-content;
    align-self: flex-start;
}

.property-info h1 {
    color: var(--primary-color);
    margin: 0 0 1rem;
    font-size: 1.8rem;
}

/* 基本資訊標籤 */
.property-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
}

.meta-item i {
    color: var(--secondary-color);
}

/* 詳細資訊區塊 */
.detail-group {
    margin-bottom: 2rem;
}

.detail-group h2 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.detail-item .label {
    color: #666;
    font-size: 0.9rem;
}

.detail-item .value {
    color: var(--primary-color);
    font-weight: 500;
}

/* 物件描述區塊 */
.property-description {
    margin: 2rem 0;
    padding: 2rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.property-description h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.property-description > *:not(h2) {
    color: #666;
    line-height: 1.6;
    margin: 0.5rem 0;
}

.property-description a {
    color: var(--secondary-color);
    text-decoration: none;
}

.property-description a:hover {
    text-decoration: underline;
}

.property-description ul,
.property-description ol {
    padding-left: 1.5rem;
}

.property-description img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1rem 0;
}

/* 聯絡資訊區 */
.contact-section {
    padding-top: 2rem;
}

.contact-section h2 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.contact-info {
    background: white;
    padding: 16px;
    border: 1px solid #eee;
    border-radius: 4px;
}

/* 代理人資訊 */
.agent-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
    margin-bottom: 16px;
}

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

.agent-profile-info h3 {
    font-size: 18px;
    color: #333;
    margin: 0 0 4px 0;
}

.agent-profile-info .title {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* 聯絡按鈕 */
.contact-buttons {
    display: grid;
    gap: 8px;
}

.contact-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.contact-button i {
    margin-right: 8px;
}

/* 電話按鈕 */
.contact-button.phone-button {
    background: #28a745;
    color: white;
    border: none;
}

.contact-button.phone-button:hover {
    background: #218838;
}

/* LINE按鈕 */
.contact-button.line-button {
    background: #00b900;
    color: white;
    border: none;
}

.contact-button.line-button:hover {
    background: #009900;
}

/* Email按鈕 */
.contact-button.email-button {
    background: #0d6efd;
    color: white;
    border: none;
}

.contact-button.email-button:hover {
    background: #0b5ed7;
}

/* 懸浮按鈕容器 */
.floating-buttons {
    position: fixed;
    right: 20px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 100;
}

/* 返回按鈕區域樣式 */
.back-section {
    margin: 0;
    padding: 0;
    background: none;
    box-shadow: none;
}

/* 懸浮按鈕共用樣式 */
.floating-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    color: var(--primary-color);
    text-decoration: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.1);
}

.floating-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.floating-button i {
    font-size: 1.2rem;
}

/* 回到頂端按鈕 */
.scroll-top {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.scroll-top.show {
    opacity: 1;
    visibility: visible;
}

/* 標題區塊 */
.property-header {
    padding: 12px;
    border-bottom: 1px solid #eee;
    background: white;
    border-radius: 8px;
}

/* 桌面版布局 */
@media (min-width: 769px) {
    .property-container {
        display: grid;
        grid-template-columns: 1fr 400px;
        gap: 20px;
        padding: 0 12px;
    }

    .back-section,
    .property-header {
        grid-column: 1 / -1;
    }

    /* 修改標題區塊排列 */
    .property-header {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-areas: 
            "title price"
            "meta meta";
        gap: 8px;
        padding: 12px;
        align-items: center;
    }

    .property-header h1 {
        grid-area: title;
        font-size: 24px;
        margin: 0;
        padding-right: 16px;
    }

    .property-price {
        grid-area: price;
        display: inline-flex;
        align-items: baseline;
        padding: 8px 12px;
        border: 1px solid #eee;
        border-radius: 4px;
        background: #fff;
        margin-bottom: 0;
        color: #e4393c;
        font-size: 24px;
        font-weight: 700;
        margin-right: 16px;
    }

    .property-price .price-per-ping {
        font-size: 15px;
        color: #333;
        margin-left: 8px;
        font-weight: normal;
        white-space: nowrap;
    }

    .property-meta {
        grid-area: meta;
        color: #666;
        font-size: 15px;
        margin: 4px 0 0 0;
    }

    /* 基本資訊容器 */
    .property-details {
        background: white;
        padding: 16px;
        border-radius: 4px;
        border: 1px solid #eee;
    }

    /* 聯絡資訊區塊 */
    .contact-info {
        background: white;
        padding: 16px;
        border: 1px solid #eee;
        border-radius: 4px;
    }

    /* 合併代理人資訊和聯絡按鈕 */
    .agent-info {
        padding: 0;
        box-shadow: none;
        margin-bottom: 16px;
    }

    .agent-profile {
        display: flex;
        align-items: center;
        text-align: left;
        margin-bottom: 16px;
    }

    .agent-profile img {
        width: 80px;
        height: 80px;
        margin: 0 16px 0 0;
    }

    .contact-buttons {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .contact-button {
        padding: 10px;
        justify-content: center;
    }

    .contact-button i {
        margin: 0;
    }

    .email-button {
        grid-column: 1 / -1;
    }
}

/* 手機版布局 */
@media (max-width: 768px) {
    .property-container {
        display: flex;
        flex-direction: column;
    }

    .property-header {
        padding: 12px;
    }

    .property-header h1 {
        font-size: 18px;
        margin: 0 0 8px 0;
    }

    .property-price {
        display: flex;
        align-items: baseline;
        padding: 8px 12px;
        border: 1px solid #eee;
        border-radius: 4px;
        background: #fff;
        margin-bottom: 8px;
        color: #e4393c;
        font-size: 22px;
        font-weight: 700;
    }

    .property-price .price-per-ping {
        font-size: 14px;
        color: #333;
        margin-left: 8px;
        font-weight: normal;
        white-space: nowrap;
    }

    .property-meta {
        color: #666;
        font-size: 14px;
    }

    /* 圖片區塊 */
    .property-gallery {
        margin: 0;
    }

    .gallery-main img {
        width: 100%;
        height: auto;
        display: block;
    }

    /* 基本資訊 */
    .property-details {
        padding: 1rem;
        background: white;
        border-radius: 10px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }

    /* 基本資訊內容兩欄排列 */
    .detail-list {
        display: grid;
        grid-template-columns: 1fr;
    }

    .detail-item {
        background: #f8f9fa;
        margin-bottom: 0.5rem;
    }

    .detail-item .label {
        color: #666;
        font-size: 14px;
    }

    .detail-item .value {
        color: #333;
        font-size: 14px;
        font-weight: 500;
    }

    /* 物件描述 */
    .property-description {
        padding: 12px;
        border-top: 1px solid #eee;
    }

    /* 聯絡資訊 */
    .contact-section {
        padding: 12px;
        border-top: 1px solid #eee;
    }

    /* 分享按鈕 */
    .share-section {
        padding: 12px;
        border-top: 1px solid #eee;
    }

    .floating-buttons {
        right: 15px;
        bottom: 15px;
        gap: 8px;
    }

    .floating-button {
        width: 40px;
        height: 40px;
    }

    .floating-button i {
        font-size: 1rem;
    }
}

/* 更小螢幕的調整 */
@media (max-width: 360px) {
    .detail-list {
        grid-template-columns: 1fr;
    }
    
    .property-details {
        padding: 0.8rem;
    }
}

@media (max-width: 480px) {
    .property-details {
        gap: 0.5rem;
    }

    .gallery-thumbs {
        padding: 0.5rem;
        gap: 0.5rem;
    }

    .gallery-thumbs img {
        height: 60px;
    }

    .share-button {
        width: 100%;
        justify-content: center;
    }
}

/* 添加 modal 樣式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
}

.close {
    position: absolute;
    right: 35px;
    top: 15px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #bbb;
}

/* 分享按鈕區域 */
.share-section {
    padding: 1.2rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.share-section h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.share-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.share-button {
    display: inline-flex;
    align-items: center;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    border: none;
    color: white;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.3s;
    font-size: 1rem;
}

.share-button i {
    margin-right: 0.5rem;
}

.share-button:hover {
    opacity: 0.9;
}

.share-button.facebook {
    background: #1877f2;
}

.share-button.line {
    background: #00c300;
}

.share-button.copy {
    background: #6c757d;
} 