/**
 * courtyard.css
 * 百花山畔 · 庭院详情页专用样式
 * 包含全幅轮播、响应式适配
 */

/* ============================================================
   1. 全局重置 & 基础
   ============================================================ */
.courtyard-single * {
    box-sizing: border-box;
}

.courtyard-single {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 20px 40px;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    color: #333;
    line-height: 1.6;
}

/* ============================================================
   2. 面包屑
   ============================================================ */
.courtyard-single .breadcrumb {
    font-size: 0.9em;
    color: #999;
    margin-bottom: 24px;
    padding: 8px 0;
}
.courtyard-single .breadcrumb a {
    color: #999;
    text-decoration: none;
}
.courtyard-single .breadcrumb a:hover {
    color: #2e7d32;
}
.courtyard-single .breadcrumb span {
    color: #333;
}

/* ============================================================
   3. 多图轮播
   ============================================================ */
.courtyard-gallery-fullwidth {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    overflow: hidden;
    background: #1a1a1a;
    margin-bottom: 30px;
}

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

.carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease-in-out;
    will-change: transform;
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.slide-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
}

.carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    padding: 10px 24px;
    font-size: 0.95em;
    text-align: center;
}

.placeholder-image {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 4em;
    color: #a5d6a7;
    background: #e8f5e9;
}
.placeholder-image p {
    margin: 10px 0 0 0;
    font-size: 0.25em;
    color: #999;
}

/* 箭头按钮 */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 28px;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}
.carousel-arrow:hover {
    background: rgba(255, 255, 255, 0.35);
}
.carousel-prev {
    left: 16px;
}
.carousel-next {
    right: 16px;
}

/* 底部圆点 */
.carousel-dots {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}
.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}
.carousel-dot.active {
    background: #fff;
    transform: scale(1.2);
}
.carousel-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* ============================================================
   4. 标题与核心信息
   ============================================================ */
.courtyard-single .courtyard-header {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}

.courtyard-single .courtyard-summary h1 {
    font-size: 2em;
    color: #2e7d32;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.courtyard-single .meta-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
    color: #666;
    font-size: 0.95em;
    margin-bottom: 8px;
}

.courtyard-single .address {
    color: #666;
    font-size: 0.95em;
    margin: 0 0 16px 0;
}

/* ============================================================
   5. 预订卡片
   ============================================================ */
.courtyard-single .booking-card-mobile {
    display: none;
}

.courtyard-single .sidebar-booking {
    position: sticky;
    top: 30px;
    align-self: start;
}

.courtyard-single .booking-card {
    background: #f8fdf8;
    border: 2px solid #a5d6a7;
    border-radius: 16px;
    padding: 24px 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
}

.courtyard-single .price-display {
    text-align: center;
    padding-bottom: 16px;
    border-bottom: 1px solid #e8f5e9;
}

.courtyard-single .price-display .label {
    display: block;
    font-size: 0.85em;
    color: #888;
}

.courtyard-single .price-display .amount {
    display: block;
    font-size: 2.6em;
    font-weight: 700;
    color: #2e7d32;
    line-height: 1.2;
}

.courtyard-single .price-display .badge {
    display: inline-block;
    background: #e8f5e9;
    padding: 4px 16px;
    border-radius: 30px;
    font-size: 0.8em;
    color: #2e7d32;
    font-weight: 600;
    margin-top: 4px;
}

.courtyard-single .booking-card select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 1em;
    margin: 16px 0 12px;
    background: #fff;
}

.courtyard-single .btn-book {
    width: 100%;
    background: #2e7d32;
    color: #fff;
    padding: 14px;
    border: none;
    border-radius: 30px;
    font-size: 1.1em;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s;
}

.courtyard-single .btn-book:hover {
    background: #1b5e20;
}

.courtyard-single .booking-card .alert {
    background: #fff3e0;
    padding: 14px;
    border-radius: 10px;
    color: #e65100;
    text-align: center;
    font-size: 0.9em;
    margin: 12px 0;
}

.courtyard-single .split-note {
    background: #f0f7f0;
    padding: 12px;
    border-radius: 10px;
    text-align: center;
    font-size: 0.85em;
    color: #2e7d32;
    margin-top: 16px;
}

/* ============================================================
   6. 正文内容
   ============================================================ */
.courtyard-single .main-content {
    font-size: 1.05em;
    line-height: 1.9;
    color: #333;
}

.courtyard-single .main-content h2,
.courtyard-single .main-content h3 {
    color: #2e7d32;
    margin-top: 1.8em;
    margin-bottom: 0.5em;
}

.courtyard-single .main-content h2 {
    font-size: 1.5em;
    border-bottom: 2px solid #a5d6a7;
    padding-bottom: 6px;
}

.courtyard-single .main-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    margin: 16px 0;
}

.courtyard-single .main-content ul,
.courtyard-single .main-content ol {
    padding-left: 22px;
}

.courtyard-single .main-content li {
    margin-bottom: 6px;
}

/* ============================================================
   7. 相关推荐
   ============================================================ */
.courtyard-single .related-courtyards {
    margin-top: 50px;
    border-top: 2px solid #f0f0f0;
    padding-top: 30px;
}

.courtyard-single .related-courtyards h2 {
    font-size: 1.3em;
    color: #2e7d32;
    margin-bottom: 16px;
}

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

.courtyard-single .related-item {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s, box-shadow 0.3s;
}

.courtyard-single .related-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.courtyard-single .related-item img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

.courtyard-single .related-item .no-image {
    width: 100%;
    height: 160px;
    background: #e8f5e9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4em;
    color: #a5d6a7;
}

.courtyard-single .related-item h4 {
    font-size: 0.95em;
    margin: 10px 12px 4px;
    color: #333;
}

.courtyard-single .related-item p {
    font-size: 0.9em;
    color: #2e7d32;
    font-weight: 600;
    margin: 0 12px 12px;
}

/* ============================================================
   8. 响应式适配
   ============================================================ */

/* 平板及以下 */
@media (max-width: 992px) {
    .courtyard-single .courtyard-header {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .courtyard-single .sidebar-booking {
        display: none;
    }
    .courtyard-single .booking-card-mobile {
        display: block;
        margin-top: 16px;
    }
    .courtyard-single .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .carousel-container {
        height: 380px;
    }
}

/* 手机端 */
@media (max-width: 768px) {
    .courtyard-single {
        padding: 12px 12px 30px;
    }
    .courtyard-single .courtyard-summary h1 {
        font-size: 1.5em;
    }
    .courtyard-single .meta-tags {
        font-size: 0.85em;
        gap: 8px 16px;
    }
    .courtyard-single .price-display .amount {
        font-size: 2em;
    }
    .courtyard-single .main-content {
        font-size: 0.98em;
    }
    .carousel-container {
        height: 320px;
    }
    .carousel-arrow {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }
    .carousel-prev {
        left: 8px;
    }
    .carousel-next {
        right: 8px;
    }
    .carousel-dot {
        width: 10px;
        height: 10px;
    }
    .slide-caption {
        font-size: 0.8em;
        padding: 6px 16px;
    }
    .courtyard-single .related-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    .courtyard-single .related-item img,
    .courtyard-single .related-item .no-image {
        height: 120px;
    }
    .courtyard-single .booking-card {
        padding: 16px;
    }
    .courtyard-single .btn-book {
        font-size: 1em;
        padding: 12px;
    }
}

/* 小屏手机 */
@media (max-width: 480px) {
    .carousel-container {
        height: 220px;
    }
    .carousel-arrow {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }
    .carousel-dot {
        width: 8px;
        height: 8px;
        gap: 6px;
    }
    .courtyard-single .related-grid {
        grid-template-columns: 1fr;
    }
    .courtyard-single .courtyard-summary h1 {
        font-size: 1.3em;
    }
}