/* ========== 基础重置 ========== */
f-specs-image,
.f-specs-image-section {
    display: block;
    width: 100%;
}

.f-specs-image__wrapper {
    display: block;
    width: 100%;
}

.f-specs-image__top {
    display: flex;
    align-items: center;
}

/* ========== 左侧标题 ========== */
.f-specs-image__header {
    margin-bottom: 30px;
}

.f-specs-image__title {
    margin: 0;
    margin-bottom: var(--specs-image-gap, 40px);

}

/* 副标题（可选） */
.f-specs-image__subtitle {
    margin: 4px 0 0 0;
    font-size: var(--font-base-size);
    color: rgb(var(--color-foreground-secondary));
}

/* ========== 右侧主区域（包含tabs和内容） ========== */
.f-specs-image__main {
    flex: 1;
    min-width: 0; /* 防止溢出 */
}

/* ========== Tab 导航 ========== */
.f-specs-image__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    width: 100%;
    margin-bottom: var(--specs-image-gap, 40px);
    border-bottom: 1px solid rgb(var(--color-border));
    padding-bottom: 16px;
}

.f-specs-image__tab-btn {
    background: none;
    border: none;
    padding: 8px 0;
    font-size: var(--font-base-size);
    font-weight: 500;
    color: rgb(var(--color-foreground-secondary));
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
}

.f-specs-image__tab-btn:hover {
    color: rgb(var(--color-foreground));
}

.f-specs-image__tab-btn.active {
    color: rgb(var(--color-foreground));
    font-weight: 600;
}

.f-specs-image__tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -17px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 3px;
    background: rgb(var(--color-foreground));
    border-radius: 2px;
}

/* ========== Tab 内容 ========== */
.f-specs-image__content {
    position: relative;
    overflow: hidden;
}

.f-specs-image__panel {
    display: none;
    animation: f-specs-image-fade 0.4s ease forwards;
}

.f-specs-image__panel.active {
    display: block;
}

@keyframes f-specs-image-fade {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== 图片 ========== */
.f-specs-image__image-wrapper {
    width: 100%;
    overflow: hidden;
    border-radius: var(--specs-image-radius, 8px);
}

.f-image {
    display: block;
    width: 100%;
}

.f-image .f-media {
    position: relative;
    display: block;
    width: 100%;
    overflow: hidden;
}

.f-image .f-media::before {
    content: '';
    display: block;
    padding-bottom: calc(1 / var(--aspect-ratio) * 100%);
}

.f-image .f-media__wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.f-image .f-media__wrapper img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.f-specs-image__image-wrapper:hover .f-media__wrapper img {
    transform: scale(1.02);
}

/* ========== 空状态 ========== */
.f-specs-image__empty {
    padding: 60px 20px;
    text-align: center;
    color: rgb(var(--color-foreground-secondary));
}

.f-placeholder-svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: rgba(var(--color-foreground), 0.1);
}

/* ============================================
   ★ PC 端（≥768px）左右布局
   ============================================ */
@media (min-width: 768px) {
    .f-specs-image__wrapper {
        /*display: flex;*/
        /*flex-direction: row;*/
        /*align-items: flex-start;*/
        /*gap: 60px;*/
    }

    .f-specs-image__header {
        flex: 0 0 auto;
        max-width: 404px;
        width: 100%;
        margin-bottom: 0;
    }

    .f-specs-image__main {
        flex: 1;
        min-width: 0;
    }

    /* 保持下划线位置正确 */
    .f-specs-image__tab-btn.active::after {
        bottom: -17px;
    }
}

/* ============================================
   ★ 移动端（≤767px）上下排列
   ============================================ */
@media (max-width: 767px) {
    .f-specs-image__top{
        display: block;
    }
    .f-specs-image__tabs {
        gap: 24px;
        padding-bottom: 12px;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .f-specs-image__tabs::-webkit-scrollbar {
        display: none;
    }

    .f-specs-image__tab-btn {
        padding: 6px 0;
        white-space: nowrap;
    }

    .f-specs-image__tab-btn.active::after {
        bottom: -13px;
        height: 2px;
    }

    .f-specs-image__header {
        margin-bottom: 20px;
    }

    .f-image .f-media::before {
        padding-bottom: calc(1 / var(--aspect-ratio-mobile) * 100%);
    }
}