/* ========================================
   轮播图容器样式
   ======================================== */
.wp-carousel-widget {
    width: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin: 20px 0;
    /* 确保容器高度由内容决定 */
    height: auto;
}

/* ========================================
   轮播图幻灯片容器
   ======================================== */
.wp-carousel-slides {
    display: flex;
    transition: transform 0.5s ease;
    /* 不设置高度，由子元素撑开 */
}

/* ========================================
   单个幻灯片 - 核心：4:3 比例
   ======================================== */
.wp-carousel-slide {
    min-width: 100%;
    position: relative;
    /* 关键：固定宽高比为 4:3 */
    aspect-ratio: 4 / 3;
    /* 防止内容溢出 */
    overflow: hidden;
}

/* ========================================
   图片样式
   ======================================== */
.wp-carousel-slide img {
    width: 100%;
    height: 100%;
    /* 填满容器并居中裁剪，保持4:3比例 */
    object-fit: cover;
    display: block;
    /* 防止图片自带边距 */
    margin: 0;
    padding: 0;
}

/* ========================================
   导航按钮样式
   ======================================== */
.wp-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.7);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    /* 按钮在4:3容器内居中，不受影响 */
}

.wp-carousel-nav:hover {
    background: rgba(255,255,255,0.9);
}

.wp-carousel-prev {
    left: 15px;
}

.wp-carousel-next {
    right: 15px;
}

/* ========================================
   指示器样式
   ======================================== */
.wp-carousel-indicators {
    position: absolute;
    bottom: 15px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 10;
}

.wp-carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.wp-carousel-indicator.active {
    background: rgba(255,255,255,0.9);
    transform: scale(1.2);
}

/* ========================================
   响应式设计
   ======================================== */
/* 平板设备 */
@media (max-width: 768px) {
    .wp-carousel-nav {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .wp-carousel-indicator {
        width: 10px;
        height: 10px;
    }
}

/* 手机设备 */
@media (max-width: 480px) {
    .wp-carousel-nav {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
    
    .wp-carousel-indicator {
        width: 8px;
        height: 8px;
        gap: 6px;
    }
}

/* ========================================
   备选：如果图片需要完整显示（不裁剪）
   将上面 .wp-carousel-slide img 的 
   object-fit: cover 改为 object-fit: contain
   ======================================== */