/* --- 弹窗整体样式 --- */
.modal {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
    width: 90%;
    max-width: 1200px;
    max-height: 85vh;
    overflow-y: auto;
    background-color: #fff;
    border-radius: 16px;
    padding: 2rem;
    position: relative;
    font-style: inherit;
    font-family: inherit;
}

/* --- 图片轮播区样式 --- */
.main-image-container {
    width: 100%;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 8px;
}

@media (min-width: 769px) {
    .main-image-container {
        aspect-ratio: 16 / 9;
        max-height: 70vh;
    }
    .main-image-container img {
        max-width: 100%;
        max-height: 100%;
        width: auto;
        height: auto;
        object-fit: contain;
    }
}

@media (max-width: 768px) {
    .main-image-container {
        height: 60vh;
    }
    .main-image-container img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }
}

/* --- 缩略图容器样式 --- */
.thumbnails-container {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    -ms-overflow-style: none;
}

.thumbnails-container::-webkit-scrollbar {
    height: 4px;
}
.thumbnails-container::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 4px;
}
.thumbnails-container::-webkit-scrollbar-track {
    background: transparent;
}

.image-thumb {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border: 2px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
}
.image-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.image-thumb.border-primary {
    border-color: #2563eb;
}

/* --- 响应式调整 - 重点优化中文斜体 --- */
@media (max-width: 768px) {
    .modal-content {
        max-height: 95vh;
        padding: 1rem;
        margin: 0.5rem;
        font-style: italic !important;
        /* 新增：指定支持中文斜体的移动端字体栈 */
        font-family: "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
    }

    .image-thumb {
        width: 50px;
        height: 50px;
    }

    /* 中文斜体核心配置：明确字体 + 强制斜体 */
    .modal-content .testimonial-slide p {
        font-style: italic !important;
        /* 移动端中文优先字体（均支持斜体/伪斜体） */
        font-family: "PingFang SC", "Heiti SC", "Microsoft YaHei", "Helvetica Neue", Roboto, sans-serif;
        font-weight: 400;
        /* 可选：增强斜体效果（避免太淡） */
        transform: skewX(-3deg); /* 轻微倾斜，模拟斜体效果（浏览器不支持时降级） */
        transform-origin: left center; /* 倾斜原点，让效果更自然 */
    }
}

/* --- 全局双语斜体保障 --- */
.testimonial-slide p,
.modal-content .testimonial-slide p {
    font-style: italic !important;
    /* 跨平台兼容字体栈：先中文后英文，都支持斜体 */
    font-family: "PingFang SC", "Heiti SC", "Microsoft YaHei", "Helvetica Neue", Arial, Roboto, sans-serif;
    font-weight: 400;
    /* 修复部分浏览器中文斜体过淡的问题 */
    opacity: 0.95;
}