/**
 * courtyard.css
 * 庭院详情页专用样式（含轮播）
 */

/* ===== 轮播容器 ===== */
.courtyard-carousel {
    position: relative;
    width: 100%;
    height: 420px;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 30px;
    background: #1a1a1a;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

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

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

/* ===== 占位图（庭院轮播专用） ===== */
.carousel-slide .placeholder-image {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    color: #aaa;
    font-size: 4rem;
}
.carousel-slide .placeholder-image p {
    margin-top: 8px;
    font-size: 0.9rem;
    color: #999;
}
/* 确保轮播高度稳定 */
.carousel-slide {
    background: #f5f5f5;
}

/* ===== 导航箭头 ===== */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.3);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s;
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
}
.carousel-arrow:hover {
    background: rgba(0,0,0,0.6);
}
.carousel-arrow.prev { left: 16px; }
.carousel-arrow.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;
    border: none;
    padding: 0;
}
.carousel-dot.active {
    background: #fff;
    transform: scale(1.25);
}
.carousel-dot:hover {
    background: rgba(255,255,255,0.8);
}

/* ===== 图片计数器 ===== */
.carousel-counter {
    position: absolute;
    bottom: 18px;
    right: 20px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    padding: 2px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    z-index: 10;
    backdrop-filter: blur(4px);
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .courtyard-carousel { height: 280px; }
    .carousel-arrow { width: 34px; height: 34px; font-size: 18px; }
    .carousel-arrow.prev { left: 10px; }
    .carousel-arrow.next { right: 10px; }
    .carousel-dot { width: 10px; height: 10px; }
    .carousel-counter { font-size: 0.7rem; bottom: 12px; right: 14px; }
}
@media (max-width: 480px) {
    .courtyard-carousel { height: 200px; }
    .carousel-arrow { width: 28px; height: 28px; font-size: 14px; }
    .carousel-arrow.prev { left: 6px; }
    .carousel-arrow.next { right: 6px; }
    .carousel-dot { width: 8px; height: 8px; }
}