    .size-chart-button-wrapper {
        margin: 15px 0;
        order: 5;
    }

    .size-chart-button {
        display: inline-flex;
        align-items: center;
        padding: 5px 15px;
        border-radius: 4px;
        color: #0066cc;
        text-decoration: none;
        transition: all 0.3s;
        font-size: 0.9em;
    }

    .size-chart-button:hover {
        background: #f8f8f8;
        color: #0066cc;
        opacity: 0.8;
    }

    .size-chart-button img.size-chart-icon {
        margin-right: 8px;
        width: 16px;
        height: 16px;
        vertical-align: middle;
        object-fit: contain;
        display: inline-block;
    }

    /* 弹窗样式 */
    #size-chart-container {
        position: fixed;
        z-index: 1000;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        overflow: hidden; /* 防止背景滚动 */
        background: rgba(0, 0, 0, 0.8);
        display: none;
        padding: 0;
    }

    #size-chart-container.mfp-ready {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    #size-chart-popup {
        position: relative;
        background: #000000;
        padding: 0;
        width: auto;
        max-width: 800px;
        max-height: 90vh; /* 限制最大高度 */
        margin: 20px auto;
        animation: size-chart-popup-animation 0.3s;
        border-radius: 8px;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    @keyframes size-chart-popup-animation {
        from {
            opacity: 0;
            transform: scale(0.8);
        }
        to {
            opacity: 1;
            transform: scale(1);
        }
    }

    .size-chart-content {
        background: #ffffff;
        overflow-x: auto;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        position: relative;
        flex: 1;
        max-height: calc(90vh - 60px); /* 为关闭按钮留出空间 */
        padding: 20px;
        box-sizing: border-box;
    }

    /* 智能滚动条显示 */
    .size-chart-content {
        scrollbar-width: thin;
        scrollbar-color: #ccc transparent;
    }

    .size-chart-content::-webkit-scrollbar {
        width: 6px;
        height: 6px;
    }

    .size-chart-content::-webkit-scrollbar-track {
        background: transparent;
    }

    .size-chart-content::-webkit-scrollbar-thumb {
        background: #ccc;
        border-radius: 3px;
    }

    .size-chart-content::-webkit-scrollbar-thumb:hover {
        background: #999;
    }

    /* 只在需要滚动时显示滚动条 */
    .size-chart-content.no-scroll::-webkit-scrollbar {
        display: none;
    }

    .size-chart-content.no-scroll {
        scrollbar-width: none;
    }

    /* 在移动端显示滑动提示 */
    @media screen and (max-width: 849px) {
        .size-chart-content:after {
            content: '← Swipe to see more →';
            position: absolute;
            bottom: 10px;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(0,0,0,0.7);
            color: #fffbff;
            padding: 5px 15px;
            border-radius: 20px;
            font-size: 12px;
            pointer-events: none;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.3s;
            white-space: nowrap;
        }
        
        .size-chart-content.show-hint:after {
            opacity: 1;
            visibility: visible;
        }
    }

    .size-guide-table {
        width: 100%;
        border-collapse: collapse;
        margin: 0;
        min-width: 600px;
    }

    .size-guide-table th,
    .size-guide-table td {
        padding: 8px;
        text-align: center;
        border: 1px solid #ddd;
        background: #fff;
        white-space: nowrap;
    }

    .size-guide-table tr:nth-child(even) {
        background-color: #f8f8f8;
    }

    .size-guide-table th {
        background-color: #f5f5f5;
    }

    .mfp-close {
        width: 44px;
        height: 44px;
        line-height: 44px;
        position: absolute;
        right: 0;
        top: 0;
        text-decoration: none;
        text-align: center;
        opacity: 0.65;
        padding: 0 0 18px 10px;
        color: #FFF;
        font-style: normal;
        font-size: 28px;
        font-family: Arial, Baskerville, monospace;
    }

    .mfp-close:hover,
    .mfp-close:focus {
        opacity: 1;
    }

    /* 移动端优化 */
    @media screen and (max-width: 849px) {
        #size-chart-container {
            padding: 15px; /* 增加内边距 */
        }

        #size-chart-popup {
            margin: 0;
            animation: none;
            width: 100%;
            max-width: none;
            max-height: 85vh; /* 移动端稍微减少高度 */
            border-radius: 12px; /* 移动端更大的圆角 */
        }

        .size-chart-content {
            max-height: calc(85vh - 80px); /* 为移动端调整高度 */
            padding: 15px; /* 移动端减少内边距 */
        }

        /* 移动端关闭按钮优化 */
        .mfp-close {
            width: 50px;
            height: 50px;
            line-height: 50px;
            font-size: 32px;
            right: 5px;
            top: 5px;
            background: rgba(0, 0, 0, 0.5);
            border-radius: 50%;
            color: #fff;
        }

        /* 移动端表格优化 */
        .size-guide-table {
            min-width: 500px; /* 移动端减少最小宽度 */
            font-size: 14px;
        }

        .size-guide-table th,
        .size-guide-table td {
            padding: 6px 4px; /* 移动端减少单元格内边距 */
            font-size: 13px;
        }
    }

    /* 防止背景滚动的样式 */
    body.popup-open {
        overflow: hidden !important;
        position: fixed !important;
        width: 100% !important;
    }

    /* 确保弹窗在所有设备上都能正确显示 */
    @media screen and (max-width: 480px) {
        #size-chart-container {
            padding: 10px;
        }

        #size-chart-popup {
            max-height: 80vh;
            border-radius: 8px;
        }

        .size-chart-content {
            max-height: calc(80vh - 70px);
            padding: 12px;
        }

        .mfp-close {
            width: 45px;
            height: 45px;
            line-height: 45px;
            font-size: 28px;
        }
    }

    /* 超小屏幕优化 */
    @media screen and (max-width: 360px) {
        .size-guide-table {
            min-width: 400px;
            font-size: 12px;
        }

        .size-guide-table th,
        .size-guide-table td {
            padding: 4px 2px;
            font-size: 11px;
        }
    }

    /* ========================================
       响应式表格自动适配 - 适用于所有表格
       ======================================== */

    /* 为所有表格添加响应式包装 */
    .size-chart-content {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    /* 覆盖用户自定义表格的固定宽度样式 */
    .size-chart-content table {
        width: auto !important;
        min-width: 100% !important;
        max-width: none !important;
        display: table !important;
    }

    /* 覆盖单元格固定宽度 - 允许自动调整 */
    .size-chart-content table td,
    .size-chart-content table th {
        width: auto !important;
        min-width: 60px !important;
        max-width: none !important;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* 第一列（通常是尺码列）保持最小宽度 */
    .size-chart-content table tr td:first-child,
    .size-chart-content table tr th:first-child {
        min-width: 50px !important;
        text-align: center !important;
        font-weight: 600;
        white-space: nowrap;
    }

    /* 移动端优化 - 小屏幕 */
    @media screen and (max-width: 768px) {
        .size-chart-content {
            overflow-x: scroll !important;
        }

        /* 移动端表格优化 */
        .size-chart-content table {
            min-width: 600px !important;
            font-size: 13px !important;
        }

        .size-chart-content table td,
        .size-chart-content table th {
            padding: 6px 8px !important;
            font-size: 12px !important;
            min-width: 55px !important;
        }

        /* 表头加粗 */
        .size-chart-content table th {
            font-weight: 600 !important;
            background-color: #f5f5f5 !important;
        }

        /* 第一列突出显示 */
        .size-chart-content table tr td:first-child {
            background-color: #fafafa !important;
            font-weight: 600 !important;
            position: sticky;
            left: 0;
            z-index: 10;
            box-shadow: 2px 0 4px rgba(0,0,0,0.1);
        }
    }

    /* 移动端优化 - 超小屏幕 */
    @media screen and (max-width: 480px) {
        .size-chart-content table {
            min-width: 500px !important;
            font-size: 12px !important;
        }

        .size-chart-content table td,
        .size-chart-content table th {
            padding: 5px 6px !important;
            font-size: 11px !important;
            min-width: 45px !important;
        }

        /* 减少边框以节省空间 */
        .size-chart-content table td,
        .size-chart-content table th {
            border-width: 1px !important;
        }
    }

    /* 移动端优化 - 极小屏幕 */
    @media screen and (max-width: 360px) {
        .size-chart-content table {
            min-width: 450px !important;
            font-size: 11px !important;
        }

        .size-chart-content table td,
        .size-chart-content table th {
            padding: 4px 5px !important;
            font-size: 10px !important;
            min-width: 40px !important;
        }

        /* 第一列保持可读 */
        .size-chart-content table tr td:first-child,
        .size-chart-content table tr th:first-child {
            min-width: 35px !important;
            font-size: 11px !important;
        }
    }

    /* 自定义尺码表容器样式 */
    .size-chart-content.size-chart-custom table {
        margin: 0 auto;
        border-collapse: collapse !important;
    }

    /* 确保表格边框清晰可见 */
    .size-chart-content table td[style*="border"],
    .size-chart-content table th[style*="border"] {
        border: 1px solid #ddd !important;
    }

    /* 优化表格行样式 */
    .size-chart-content table tr:nth-child(even) {
        background-color: rgba(248, 248, 248, 0.5) !important;
    }

    /* 移动端滚动条优化 */
    @media screen and (max-width: 768px) {
        .size-chart-content {
            scrollbar-width: thin;
            scrollbar-color: rgba(0, 0, 0, 0.3) transparent;
        }

        .size-chart-content::-webkit-scrollbar {
            width: 4px;
            height: 4px;
        }

        .size-chart-content::-webkit-scrollbar-thumb {
            background: rgba(0, 0, 0, 0.3);
            border-radius: 2px;
        }

        .size-chart-content::-webkit-scrollbar-track {
            background: transparent;
        }
    }

    /* 横向滚动提示动画 */
    @media screen and (max-width: 768px) {
        .size-chart-content::before {
            content: '';
            position: absolute;
            top: 50%;
            right: 20px;
            transform: translateY(-50%);
            width: 30px;
            height: 30px;
            background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.1));
            pointer-events: none;
            opacity: 0;
            transition: opacity 0.3s;
            border-radius: 50%;
        }

        .size-chart-content.show-hint::before {
            opacity: 1;
            animation: scroll-hint 1.5s ease-in-out infinite;
        }

        @keyframes scroll-hint {
            0%, 100% {
                transform: translateY(-50%) translateX(0);
                opacity: 0;
            }
            50% {
                transform: translateY(-50%) translateX(-10px);
                opacity: 1;
            }
        }
    }