/* Instagram样式小部件 */

/* 防止弹窗打开时页面滚动 */
body.baijia-ins-popup-open {
    overflow: hidden !important;
}

.baijia-ins-wrapper {
    position: relative;
    width: 100%;
}

/* 封面样式 */
.baijia-ins-cover {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    cursor: pointer;
}

.baijia-ins-cover img,
.baijia-ins-cover video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.baijia-ins-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
    pointer-events: none;
}

.baijia-ins-cover:hover .baijia-ins-overlay {
    background: rgba(0, 0, 0, 0.1);
}

/* 弹窗遮罩 */
.baijia-ins-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.baijia-ins-popup-overlay.active {
    display: flex;
    opacity: 1;
}

/* 弹窗容器 */
.baijia-ins-popup-container {
    position: relative;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.baijia-ins-popup-overlay.active .baijia-ins-popup-container {
    transform: scale(1);
}

/* 关闭按钮 - 使用span，无背景 */
.baijia-ins-popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.baijia-ins-popup-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

.baijia-ins-popup-close svg {
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* 弹窗内容 */
.baijia-ins-popup-content {
    display: flex;
    height: 90vh;
    max-height: 800px;
}

/* 左侧媒体区域 - 占满无边距 */
.baijia-ins-popup-media {
    flex: 0 0 60%;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 0;
}

.baijia-ins-popup-media img,
.baijia-ins-popup-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 轮播图 */
.baijia-ins-gallery {
    width: 100%;
    height: 100%;
}

.baijia-ins-gallery .swiper-wrapper {
    height: 100%;
}

.baijia-ins-gallery .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.baijia-ins-gallery .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.baijia-ins-gallery .swiper-button-prev,
.baijia-ins-gallery .swiper-button-next {
    color: #ffffff;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
}

.baijia-ins-gallery .swiper-button-prev:after,
.baijia-ins-gallery .swiper-button-next:after {
    font-size: 20px;
}

.baijia-ins-gallery .swiper-pagination-bullet {
    background: #ffffff;
    opacity: 0.5;
}

.baijia-ins-gallery .swiper-pagination-bullet-active {
    opacity: 1;
}

/* 右侧信息区域 */
.baijia-ins-popup-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    overflow-y: auto;
}

/* 头部 */
.baijia-ins-popup-header {
    display: flex;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #efefef;
}

.baijia-ins-popup-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 12px;
}

.baijia-ins-popup-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.baijia-ins-popup-username {
    font-weight: 600;
    font-size: 14px;
    color: #333333;
}

/* 内容区域 */
.baijia-ins-popup-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.baijia-ins-popup-title {
    font-size: 20px;
    font-weight: 600;
    color: #333333;
    margin: 0 0 15px 0;
    line-height: 1.4;
}

.baijia-ins-popup-description {
    font-size: 14px;
    color: #666666;
    line-height: 1.6;
    margin-bottom: 20px;
    white-space: pre-wrap;
}

/* 产品样式 */
.baijia-ins-product {
    display: flex;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    margin-top: 20px;
    gap: 15px;
}

.baijia-ins-product-image {
    flex: 0 0 80px;
}

.baijia-ins-product-image img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
}

.baijia-ins-product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.baijia-ins-product-title {
    font-size: 14px;
    font-weight: 600;
    color: #333333;
    margin: 0 0 8px 0;
}

.baijia-ins-product-price {
    font-size: 16px;
    font-weight: 700;
    color: #0066cc;
    margin-bottom: 10px;
}

.baijia-ins-product-button {
    display: inline-block;
    padding: 8px 16px;
    background: #333333;
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.3s ease;
    text-align: center;
    max-width: 120px;
}

.baijia-ins-product-button:hover {
    background: #000000;
    color: #ffffff;
}

/* 平板响应式 */
@media (max-width: 1024px) {
    .baijia-ins-popup-content {
        max-height: 85vh;
    }
    
    .baijia-ins-popup-media {
        flex: 0 0 50%;
    }
}

/* 手机响应式 */
@media (max-width: 767px) {
    .baijia-ins-popup-container {
        width: 95%;
        max-height: 95vh;
    }
    
    .baijia-ins-popup-content {
        flex-direction: column;
        max-height: 95vh;
    }
    
    .baijia-ins-popup-media {
        flex: 0 0 50%;
        min-height: 300px;
    }
    
    .baijia-ins-popup-info {
        flex: 1;
        min-height: 0;
    }
    
    .baijia-ins-popup-body {
        padding: 15px;
    }
    
    .baijia-ins-popup-title {
        font-size: 18px;
    }
    
    .baijia-ins-product {
        flex-direction: column;
        text-align: center;
    }
    
    .baijia-ins-product-image {
        flex: none;
        margin: 0 auto 15px;
    }
    
    .baijia-ins-product-button {
        max-width: 100%;
    }
}

/* 滚动条样式 */
.baijia-ins-popup-body::-webkit-scrollbar {
    width: 6px;
}

.baijia-ins-popup-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.baijia-ins-popup-body::-webkit-scrollbar-thumb {
    background: #cccccc;
    border-radius: 3px;
}

.baijia-ins-popup-body::-webkit-scrollbar-thumb:hover {
    background: #999999;
}

