/* ================================
   包装清单和产品尺寸公共样式
   Info_DIM.common.css
   适用于全站所有产品的包装清单和尺寸展示
================================ */

/* ================================
   包装清单部分 (Package List Section)
================================ */
.package-list-section {
    padding: 60px 0;
    background: var(--bg-section);
}

.package-list-section .section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.package-list-section .section-title {
    color: var(--text-primary);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
}

.package-list-section .section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 0;
}

/* 锚点链接样式 */
.package-list-section .anchor {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.8em;
    margin-left: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.package-list-section .section-title:hover .anchor {
    opacity: 1;
}

/* 接口选择器 */
.interface-selector {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.interface-btn {
    padding: 0.5rem 1.2rem;
    background: var(--bg-white);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.interface-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.interface-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--text-white);
    box-shadow: var(--shadow-md);
}

.interface-btn.active::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid var(--primary-color);
}

/* 包装清单内容容器 */
.pack-content {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 包装清单变体（根据接口类型） */
.pack-variant {
    display: none;
}

.pack-variant.active {
    display: block;
    animation: slideIn 0.4s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 包装清单列表样式 */
.pack-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pack-list-item {
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1rem 1.2rem;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.pack-list-item:hover {
    background: var(--bg-white);
    border-color: var(--primary-color);
    transform: translateX(5px);
    box-shadow: var(--shadow-sm);
}

.pack-list-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary-color);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.pack-list-item:hover::before {
    transform: scaleY(1);
}

.pack-list-item strong {
    color: var(--primary-color);
    font-weight: 600;
    margin-right: 0.5rem;
    display: inline-block;
    min-width: 25px;
}

/* 包装图片展示 */
.pack-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    background: var(--bg-white);
    cursor: zoom-in;
    transition: all 0.3s ease;
    padding: 1rem;
}

.pack-image-wrapper:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

.pack-image-wrapper img {
    width: 100%;
    height: auto;
    max-height: 350px;
    object-fit: contain;
    display: block;
    transition: transform 0.3s ease;
}

.pack-image-wrapper:hover img {
    transform: scale(1.05);
}

.pack-image-caption {
    padding: 1rem;
    background: var(--bg-white);
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: center;
    border-top: 1px solid var(--border-light);
}

/* 查看大图提示 */
.pack-image-wrapper::after {
    content: '\f002';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: rgba(47, 128, 237, 0.9);
    color: var(--text-white);
    width: 60px;
    height: 60px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.pack-image-wrapper:hover::after {
    transform: translate(-50%, -50%) scale(1);
}

/* ================================
   产品尺寸部分 (Product Dimensions Section)
================================ */
.dimensions-section {
    padding: 60px 0;
    background: var(--bg-white);
}

.dimensions-section .section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.dimensions-section .section-title {
    color: var(--text-primary);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
}

/* 产品尺寸卡片 - 始终显示 */
.dimension-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.dimension-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* 尺寸图片容器 - 占据卡片主要空间 */
.dimension-image-wrapper {
    position: relative;
    overflow: hidden;
    background: var(--bg-light);
    cursor: zoom-in;
    padding: 1.5rem;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
}

.dimension-image-wrapper a {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dimension-image-wrapper img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    transition: transform 0.3s ease;
}

.dimension-image-wrapper:hover img {
    transform: scale(1.05);
}

/* 尺寸图信息 - 固定在底部 */
.dimension-info {
    padding: 1rem;
    background: var(--bg-white);
    border-top: 3px solid var(--primary-color);
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.dimension-title {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.dimension-type {
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dimension-type .badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: var(--primary-color);
    color: var(--text-white);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
}

.dimension-type .badge.cooled {
    background: #00BCD4;
}

.dimension-type .badge.uncooled {
    background: #FF9800;
}

/* 查看大图提示 - 新样式 */
.dimension-image-wrapper::before {
    content: '\f00e';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: var(--text-white);
    width: 35px;
    height: 35px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.dimension-image-wrapper:hover::before {
    opacity: 1;
}

/* ================================
   选项卡切换提示
================================ */
.tab-hint {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 1rem;
    font-style: italic;
}

.tab-hint i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

/* ================================
   响应式设计
================================ */
@media (max-width: 1200px) {
    /* 平板横屏 */
    .dimension-image-wrapper {
        min-height: 250px;
    }
}

@media (max-width: 992px) {
    .interface-selector {
        padding: 0 1rem;
    }

    .interface-btn {
        padding: 0.4rem 1rem;
        font-size: 0.85rem;
    }

    /* 尺寸卡片在平板上两列显示 */
    .dimension-image-wrapper {
        min-height: 220px;
        padding: 1rem;
    }

    .dimension-info {
        min-height: 70px;
    }
}

@media (max-width: 768px) {
    .package-list-section .section-title,
    .dimensions-section .section-title {
        font-size: 1.5rem;
    }

    .pack-content {
        padding: 1.5rem;
    }

    .pack-list-item {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }

    /* 尺寸卡片在移动端单列显示 */
    .dimension-card {
        max-width: 400px;
        margin: 0 auto;
    }

    .dimension-image-wrapper {
        min-height: 200px;
    }

    .interface-selector {
        gap: 0.3rem;
        flex-wrap: wrap;
    }

    .interface-btn {
        padding: 0.35rem 0.8rem;
        font-size: 0.8rem;
    }

    .interface-btn.active::after {
        display: none;
    }
}

@media (max-width: 576px) {
    .package-list-section,
    .dimensions-section {
        padding: 40px 0;
    }

    .pack-content {
        padding: 1rem;
        border-radius: var(--radius-md);
    }

    .pack-list-item {
        margin-bottom: 0.5rem;
    }

    /* 小屏幕优化 */
    .dimension-card {
        max-width: 100%;
    }

    .dimension-image-wrapper {
        min-height: 180px;
        padding: 0.8rem;
    }

    .dimension-info {
        min-height: 65px;
        padding: 0.8rem;
    }

    .dimension-title {
        font-size: 0.9rem;
    }

    .dimension-type {
        font-size: 0.85rem;
    }

    .dimension-type .badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
}

/* ================================
   打印样式
================================ */
@media print {
    .interface-selector,
    .tab-hint {
        display: none !important;
    }

    .pack-variant,
    .dimension-card {
        display: block !important;
        page-break-inside: avoid;
    }

    .pack-image-wrapper::after,
    .dimension-image-wrapper::after {
        display: none !important;
    }
}