/* 客制化选色页面专用样式 */

/* 默认样式 - 确保按钮组在所有屏幕尺寸下都可见 */
.color-action-buttons {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    justify-content: center !important;
    margin-top: 25px !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* 确保按钮组在任何情况下都可见 */
.color-selection-panel .color-action-buttons,
.multilayer-layout .color-action-buttons,
#color-summary-new .color-action-buttons {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* 移动端优化 */
@media (max-width: 768px) {
    /* 选色面板滚动隔离 */
    .multilayer-layout {
        overflow: hidden !important;
    }
    
    .multilayer-layout .parts-color-panel {
        overflow-y: auto !important;
        overflow-x: hidden !important;
    }
    
    .color-layout {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
        padding: 0 10px !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    /* 移动端布局调整 - 树形菜单显示在预览图上方 */
    .color-product-tree {
        order: 1 !important;
        margin-bottom: 15px !important;
    }
    
    .color-selection-panel {
        order: 2 !important;
    }
    
    .color-page-header {
        padding: 40px 0 20px !important;
        margin-top: 0 !important;
    }
    
    .color-page-title h1 {
        font-size: 1.8rem !important;
        margin-bottom: 8px !important;
    }
    
    .color-page-title h2 {
        font-size: 1rem !important;
        margin-bottom: 0 !important;
    }
    
    .color-product-tree {
        max-height: 600px !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        background: rgba(0, 0, 0, 0.8) !important;
        border-radius: 8px !important;
        padding: 10px !important;
        -webkit-overflow-scrolling: touch !important;
        scroll-behavior: smooth !important;
        touch-action: pan-y !important;
        -webkit-user-select: none !important;
        user-select: none !important;
    }
    
    .color-selection-panel {
        min-height: 400px !important;
        background: rgba(0, 0, 0, 0.8) !important;
        border-radius: 8px !important;
        padding: 15px !important;
    }
    
    .multilayer-layout {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    /* 移动端多图层布局优化 */
    .parts-color-panel {
        order: 2 !important;
        max-height: 200px !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        margin-top: 15px !important;
        -webkit-overflow-scrolling: touch !important;
        scroll-behavior: smooth !important;
        touch-action: pan-y !important;
        -webkit-user-select: none !important;
        user-select: none !important;
        position: relative !important;
        z-index: 10 !important;
        background: rgba(255, 255, 255, 0.95) !important;
        border-radius: 8px !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    }
    
    /* 确保选色区域内的滚动不会影响外部 */
    .parts-color-panel * {
        touch-action: pan-y !important;
    }
    
    /* 选色区域内的滚动条样式 */
    .parts-color-panel::-webkit-scrollbar {
        width: 6px !important;
    }
    
    .parts-color-panel::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.1) !important;
        border-radius: 3px !important;
    }
    
    .parts-color-panel::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.3) !important;
        border-radius: 3px !important;
    }
    
    .parts-color-panel::-webkit-scrollbar-thumb:hover {
        background: rgba(0, 0, 0, 0.5) !important;
    }
    
    .preview-area {
        order: 1 !important;
        margin-bottom: 15px !important;
    }
    
    .parts-color-title {
        font-size: 0.9rem !important;
        margin-bottom: 8px !important;
    }
    
    .parts-color-panel {
        max-height: 300px !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        scroll-behavior: smooth !important;
        touch-action: pan-y !important;
        -webkit-user-select: none !important;
        user-select: none !important;
    }
    
    .part-color-option {
        width: 20px !important;
        height: 20px !important;
        min-width: 20px !important;
    }
    
    .part-colors {
        gap: 3px !important;
    }
    
    #multilayer-preview-container {
        max-width: 100% !important;
        min-width: 200px !important;
    }
    
    /* 产品信息头部优化 */
    .color-product-header {
        padding: 8px 0 !important;
        margin-bottom: 8px !important;
    }
    
    .color-product-name {
        font-size: 1rem !important;
        font-weight: bold !important;
    }
    
    /* 颜色预览区域优化 */
    .color-preview-section {
        margin-top: 8px !important;
    }
    
    .color-preview-title {
        font-size: 0.85rem !important;
        margin-bottom: 6px !important;
    }
    
    /* 部位选择区域优化 */
    .parts-color-panel {
        max-height: 180px !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        padding: 6px !important;
        -webkit-overflow-scrolling: touch !important;
        scroll-behavior: smooth !important;
        touch-action: pan-y !important;
        -webkit-user-select: none !important;
        user-select: none !important;
    }
    
    .part-group {
        margin-bottom: 6px !important;
        padding: 4px !important;
    }
    
    .part-header {
        min-width: 90px !important;
        padding: 3px 4px !important;
    }
    
    .part-name {
        font-size: 0.7rem !important;
    }
    
    .part-status {
        font-size: 0.55rem !important;
        padding: 1px 2px !important;
    }
    
    .part-colors {
        gap: 1px !important;
        padding: 1px 0 !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        white-space: nowrap !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: thin !important;
        scrollbar-color: #666 #333 !important;
    }
    
    .part-colors::-webkit-scrollbar {
        height: 4px !important;
    }
    
    .part-colors::-webkit-scrollbar-track {
        background: #333 !important;
        border-radius: 2px !important;
    }
    
    .part-colors::-webkit-scrollbar-thumb {
        background: #666 !important;
        border-radius: 2px !important;
    }
    
    .part-colors::-webkit-scrollbar-thumb:hover {
        background: #888 !important;
    }
    
    .part-color-option {
        width: 16px !important;
        height: 16px !important;
        min-width: 16px !important;
    }
    
    /* 说明文字优化 */
    .color-preview-section p,
    .color-options-section p {
        font-size: 0.7rem !important;
        line-height: 1.3 !important;
        margin: 3px 0 !important;
        padding: 0 5px !important;
    }
    
    /* 按钮优化 */
    .color-btn {
        padding: 6px 10px !important;
        font-size: 0.75rem !important;
        margin: 3px !important;
    }
    
    .color-action-buttons {
        margin-top: 25px !important;
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 5px !important;
        justify-content: center !important;
        padding-bottom: 10px !important;
    }
    
    /* 多图层布局中的按钮区域优化 */
    .multilayer-layout .color-action-buttons {
        margin-top: 15px !important;
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
        justify-content: center !important;
        padding: 10px !important;
        background: rgba(255, 255, 255, 0.95) !important;
        border-radius: 8px !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    }
    
    .multilayer-layout .color-action-buttons .color-btn {
        padding: 8px 12px !important;
        font-size: 0.8rem !important;
        margin: 0 !important;
        min-width: 120px !important;
        justify-content: center !important;
    }
    
    /* 中等屏幕隐藏配色信息窗口，但保留按钮组 */
    #color-summary {
        display: none !important;
    }
    
    /* 确保按钮组在大窗口模式下可见 */
    .color-action-buttons {
        display: flex !important;
    }
    
    /* 中等屏幕隐藏欢迎界面说明 */
    .color-welcome {
        display: none !important;
    }
    
    /* 最小屏幕产品选择后的布局优化 */
    .color-interface.active .color-layout {
        display: flex !important;
        flex-direction: column !important;
        gap: 6px !important;
    }
    
    .color-interface.active .color-product-tree {
        order: 1 !important;
        max-height: 160px !important;
        overflow-y: auto !important;
        margin-bottom: 6px !important;
    }
    
    .color-interface.active .color-selection-panel {
        order: 2 !important;
        margin-top: 6px !important;
    }
    
    /* 小屏幕产品选择后的布局优化 */
    .color-interface.active .color-layout {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
    }
    
    .color-interface.active .color-product-tree {
        order: 1 !important;
        max-height: 180px !important;
        overflow-y: auto !important;
        margin-bottom: 8px !important;
    }
    
    .color-interface.active .color-selection-panel {
        order: 2 !important;
        margin-top: 8px !important;
    }
    
    /* 移动端产品选择后的布局优化 */
    .color-interface.active .color-layout {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    .color-interface.active .color-product-tree {
        order: 1 !important;
        max-height: 200px !important;
        overflow-y: auto !important;
        margin-bottom: 10px !important;
    }
    
    .color-interface.active .color-selection-panel {
        order: 2 !important;
        margin-top: 10px !important;
    }
    
    #color-summary-new {
        flex: 1 1 auto !important;
        max-width: 100% !important;
        height: 300px !important;
    }
    
    /* 产品树移动端优化 */
    .color-category-header,
    .color-subcategory-header {
        padding: 8px 10px !important;
        font-size: 0.9rem !important;
    }
    
    .color-product-item {
        padding: 6px 10px !important;
        font-size: 0.8rem !important;
        cursor: pointer !important;
        touch-action: manipulation !important;
        -webkit-tap-highlight-color: transparent !important;
        user-select: none !important;
        -webkit-user-select: none !important;
        border-radius: 4px !important;
        transition: background-color 0.2s ease !important;
    }
    
    .color-product-item:active {
        background-color: rgba(255, 255, 255, 0.1) !important;
    }
    
    .color-product-list {
        margin-left: 15px !important;
    }
    
    /* 产品分类树标题优化 */
    .color-tree-title {
        font-size: 0.9rem !important;
        padding: 8px 10px !important;
        margin-bottom: 10px !important;
    }
    
    /* 图例说明区域优化 */
    .color-product-tree div[style*="background: #333"] {
        padding: 8px !important;
        margin-bottom: 10px !important;
        font-size: 0.7rem !important;
    }
    
    .color-product-tree div[style*="background: #333"] div {
        margin-bottom: 2px !important;
    }
}

@media (max-width: 576px) {
    /* 选色面板滚动隔离 */
    .multilayer-layout {
        overflow: hidden !important;
    }
    
    .multilayer-layout .parts-color-panel {
        overflow-y: auto !important;
        overflow-x: hidden !important;
    }
    
    /* 移动端布局调整 - 树形菜单显示在预览图上方 */
    .color-layout {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    .color-product-tree {
        order: 1 !important;
        margin-bottom: 10px !important;
        max-height: 500px !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        scroll-behavior: smooth !important;
        touch-action: pan-y !important;
        -webkit-user-select: none !important;
        user-select: none !important;
    }
    
    .color-selection-panel {
        order: 2 !important;
        min-height: 350px !important;
    }
    
    .color-page-header {
        padding: 30px 0 15px !important;
    }
    
    .color-page-title h1 {
        font-size: 1.5rem !important;
    }
    
    .color-page-title h2 {
        font-size: 0.9rem !important;
    }
    
    .multilayer-layout {
        grid-template-columns: 1fr !important;
        gap: 18px !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    .parts-color-panel {
        order: 2 !important;
        max-height: 180px !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        margin-top: 18px !important;
        -webkit-overflow-scrolling: touch !important;
        scroll-behavior: smooth !important;
        touch-action: pan-y !important;
        -webkit-user-select: none !important;
        user-select: none !important;
        position: relative !important;
        z-index: 10 !important;
        background: rgba(255, 255, 255, 0.95) !important;
        border-radius: 8px !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    }
    
    /* 确保选色区域内的滚动不会影响外部 */
    .parts-color-panel * {
        touch-action: pan-y !important;
    }
    
    /* 选色区域内的滚动条样式 */
    .parts-color-panel::-webkit-scrollbar {
        width: 6px !important;
    }
    
    .parts-color-panel::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.1) !important;
        border-radius: 3px !important;
    }
    
    .parts-color-panel::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.3) !important;
        border-radius: 3px !important;
    }
    
    .parts-color-panel::-webkit-scrollbar-thumb:hover {
        background: rgba(0, 0, 0, 0.5) !important;
    }
    
    .preview-area {
        order: 1 !important;
        margin-bottom: 18px !important;
    }
    
    .parts-color-title {
        font-size: 0.85rem !important;
        margin-bottom: 6px !important;
    }
    
    .parts-color-panel {
        max-height: 180px !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        scroll-behavior: smooth !important;
        touch-action: pan-y !important;
        -webkit-user-select: none !important;
        user-select: none !important;
        position: relative !important;
        z-index: 10 !important;
        background: rgba(255, 255, 255, 0.95) !important;
        border-radius: 8px !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    }
    
    /* 确保选色区域内的滚动不会影响外部 */
    .parts-color-panel * {
        touch-action: pan-y !important;
    }
    
    /* 选色区域内的滚动条样式 */
    .parts-color-panel::-webkit-scrollbar {
        width: 6px !important;
    }
    
    .parts-color-panel::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.1) !important;
        border-radius: 3px !important;
    }
    
    .parts-color-panel::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.3) !important;
        border-radius: 3px !important;
    }
    
    .parts-color-panel::-webkit-scrollbar-thumb:hover {
        background: rgba(0, 0, 0, 0.5) !important;
    }
    
    .part-color-option {
        width: 18px !important;
        height: 18px !important;
        min-width: 18px !important;
    }
    
    .part-colors {
        gap: 2px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        white-space: nowrap !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: thin !important;
        scrollbar-color: #666 #333 !important;
    }
    
    .part-colors::-webkit-scrollbar {
        height: 4px !important;
    }
    
    .part-colors::-webkit-scrollbar-track {
        background: #333 !important;
        border-radius: 2px !important;
    }
    
    .part-colors::-webkit-scrollbar-thumb {
        background: #666 !important;
        border-radius: 2px !important;
    }
    
    .part-colors::-webkit-scrollbar-thumb:hover {
        background: #888 !important;
    }
    
    #color-summary-new {
        height: 250px !important;
    }
    
    /* 小屏幕进一步优化 */
    .color-product-header {
        padding: 6px 0 !important;
        margin-bottom: 6px !important;
    }
    
    .color-product-name {
        font-size: 0.9rem !important;
    }
    
    .color-preview-section {
        margin-top: 6px !important;
    }
    
    .color-preview-title {
        font-size: 0.8rem !important;
        margin-bottom: 4px !important;
    }
    
    .color-product-tree {
        max-height: 400px !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        scroll-behavior: smooth !important;
        touch-action: pan-y !important;
        -webkit-user-select: none !important;
        user-select: none !important;
    }
    
    .parts-color-panel {
        max-height: 160px !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        padding: 4px !important;
        -webkit-overflow-scrolling: touch !important;
        scroll-behavior: smooth !important;
        touch-action: pan-y !important;
        -webkit-user-select: none !important;
        user-select: none !important;
        position: relative !important;
        z-index: 10 !important;
        background: rgba(255, 255, 255, 0.95) !important;
        border-radius: 8px !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    }
    
    /* 确保选色区域内的滚动不会影响外部 */
    .parts-color-panel * {
        touch-action: pan-y !important;
    }
    
    /* 选色区域内的滚动条样式 */
    .parts-color-panel::-webkit-scrollbar {
        width: 6px !important;
    }
    
    .parts-color-panel::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.1) !important;
        border-radius: 3px !important;
    }
    
    .parts-color-panel::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.3) !important;
        border-radius: 3px !important;
    }
    
    .parts-color-panel::-webkit-scrollbar-thumb:hover {
        background: rgba(0, 0, 0, 0.5) !important;
    }
    
    .part-group {
        margin-bottom: 4px !important;
        padding: 3px !important;
    }
    
    .part-header {
        min-width: 80px !important;
        padding: 2px 3px !important;
    }
    
    .part-name {
        font-size: 0.65rem !important;
    }
    
    .part-status {
        font-size: 0.5rem !important;
        padding: 1px 2px !important;
    }
    
    .part-colors {
        gap: 1px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        white-space: nowrap !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: thin !important;
        scrollbar-color: #666 #333 !important;
    }
    
    .part-colors::-webkit-scrollbar {
        height: 4px !important;
    }
    
    .part-colors::-webkit-scrollbar-track {
        background: #333 !important;
        border-radius: 2px !important;
    }
    
    .part-colors::-webkit-scrollbar-thumb {
        background: #666 !important;
        border-radius: 2px !important;
    }
    
    .part-colors::-webkit-scrollbar-thumb:hover {
        background: #888 !important;
    }
    
    .part-color-option {
        width: 15px !important;
        height: 15px !important;
        min-width: 15px !important;
    }
    
    .color-preview-section p,
    .color-options-section p {
        font-size: 0.65rem !important;
        line-height: 1.2 !important;
        margin: 2px 0 !important;
        padding: 0 3px !important;
    }
    
    .color-btn {
        padding: 5px 8px !important;
        font-size: 0.7rem !important;
        margin: 2px !important;
    }
    
    .color-action-buttons {
        margin-top: 20px !important;
        gap: 3px !important;
        padding-bottom: 8px !important;
    }
    
    /* 小屏幕隐藏配色信息窗口，但保留按钮组 */
    #color-summary {
        display: none !important;
    }
    
    /* 确保按钮组在小屏幕模式下可见 */
    .color-action-buttons {
        display: flex !important;
    }
    
    /* 小屏幕隐藏欢迎界面说明 */
    .color-welcome {
        display: none !important;
    }
    

    
    /* 产品树进一步优化 */
    .color-category-header,
    .color-subcategory-header {
        padding: 6px 8px !important;
        font-size: 0.8rem !important;
    }
    
    .color-product-item {
        padding: 5px 8px !important;
        font-size: 0.75rem !important;
        cursor: pointer !important;
        touch-action: manipulation !important;
        -webkit-tap-highlight-color: transparent !important;
        user-select: none !important;
        -webkit-user-select: none !important;
        border-radius: 4px !important;
        transition: background-color 0.2s ease !important;
    }
    
    .color-product-item:active {
        background-color: rgba(255, 255, 255, 0.1) !important;
    }
    
    .color-product-list {
        margin-left: 10px !important;
    }
    
    /* 产品分类树标题进一步优化 */
    .color-tree-title {
        font-size: 0.8rem !important;
        padding: 6px 8px !important;
        margin-bottom: 8px !important;
    }
    
    /* 图例说明区域进一步优化 */
    .color-product-tree div[style*="background: #333"] {
        padding: 6px !important;
        margin-bottom: 8px !important;
        font-size: 0.65rem !important;
    }
    
    .color-product-tree div[style*="background: #333"] div {
        margin-bottom: 1px !important;
    }
}

@media (max-width: 479px) {
    /* 选色面板滚动隔离 */
    .multilayer-layout {
        overflow: hidden !important;
    }
    
    .multilayer-layout .parts-color-panel {
        overflow-y: auto !important;
        overflow-x: hidden !important;
    }
    
    /* 移动端布局调整 - 树形菜单显示在预览图上方 */
    .color-layout {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
    }
    
    .color-product-tree {
        order: 1 !important;
        margin-bottom: 8px !important;
        max-height: 450px !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        scroll-behavior: smooth !important;
        touch-action: pan-y !important;
        -webkit-user-select: none !important;
        user-select: none !important;
    }
    
    .color-selection-panel {
        order: 2 !important;
        min-height: 300px !important;
    }
    
    .color-page-header {
        padding: 25px 0 10px !important;
    }
    
    .color-page-title h1 {
        font-size: 1.3rem !important;
    }
    
    .color-page-title h2 {
        font-size: 0.8rem !important;
    }
    
    .multilayer-layout {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    .parts-color-panel {
        order: 2 !important;
        max-height: 160px !important;
        overflow-y: auto !important;
        margin-top: 20px !important;
    }
    
    .preview-area {
        order: 1 !important;
        margin-bottom: 20px !important;
    }
    
    .parts-color-title {
        font-size: 0.8rem !important;
        margin-bottom: 5px !important;
    }
    
    .parts-color-panel {
        max-height: 160px !important;
    }
    
    .part-color-option {
        width: 16px !important;
        height: 16px !important;
        min-width: 16px !important;
    }
    
    .part-colors {
        gap: 1px !important;
    }
    
    #color-summary-new {
        height: 200px !important;
    }
    
    /* 最小屏幕最终优化 */
    .color-product-header {
        padding: 5px 0 !important;
        margin-bottom: 5px !important;
    }
    
    .color-product-name {
        font-size: 0.85rem !important;
    }
    
    .color-preview-section {
        margin-top: 5px !important;
    }
    
    .color-preview-title {
        font-size: 0.75rem !important;
        margin-bottom: 3px !important;
    }
    
    .parts-color-panel {
        max-height: 140px !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        padding: 3px !important;
        -webkit-overflow-scrolling: touch !important;
        scroll-behavior: smooth !important;
        touch-action: pan-y !important;
        -webkit-user-select: none !important;
        user-select: none !important;
        position: relative !important;
        z-index: 10 !important;
        background: rgba(255, 255, 255, 0.95) !important;
        border-radius: 8px !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    }
    
    /* 确保选色区域内的滚动不会影响外部 */
    .parts-color-panel * {
        touch-action: pan-y !important;
    }
    
    /* 选色区域内的滚动条样式 */
    .parts-color-panel::-webkit-scrollbar {
        width: 6px !important;
    }
    
    .parts-color-panel::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.1) !important;
        border-radius: 3px !important;
    }
    
    .parts-color-panel::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.3) !important;
        border-radius: 3px !important;
    }
    
    .parts-color-panel::-webkit-scrollbar-thumb:hover {
        background: rgba(0, 0, 0, 0.5) !important;
    }
    
    .part-group {
        margin-bottom: 3px !important;
        padding: 2px !important;
    }
    
    .part-header {
        min-width: 70px !important;
        padding: 2px 2px !important;
    }
    
    .part-name {
        font-size: 0.6rem !important;
    }
    
    .part-status {
        font-size: 0.45rem !important;
        padding: 1px 1px !important;
    }
    
    .part-colors {
        gap: 1px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        white-space: nowrap !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: thin !important;
        scrollbar-color: #666 #333 !important;
    }
    
    .part-colors::-webkit-scrollbar {
        height: 4px !important;
    }
    
    .part-colors::-webkit-scrollbar-track {
        background: #333 !important;
        border-radius: 2px !important;
    }
    
    .part-colors::-webkit-scrollbar-thumb {
        background: #666 !important;
        border-radius: 2px !important;
    }
    
    .part-colors::-webkit-scrollbar-thumb:hover {
        background: #888 !important;
    }
    
    .part-color-option {
        width: 14px !important;
        height: 14px !important;
        min-width: 14px !important;
    }
    
    .color-preview-section p,
    .color-options-section p {
        font-size: 0.6rem !important;
        line-height: 1.1 !important;
        margin: 1px 0 !important;
        padding: 0 2px !important;
    }
    
    .color-btn {
        padding: 4px 6px !important;
        font-size: 0.65rem !important;
        margin: 1px !important;
    }
    
    .color-action-buttons {
        margin-top: 18px !important;
        gap: 2px !important;
        padding-bottom: 6px !important;
    }
    
    /* 移动端隐藏配色信息窗口，但保留按钮组 */
    #color-summary {
        display: none !important;
    }
    
    /* 确保按钮组在移动端模式下可见 */
    .color-action-buttons {
        display: flex !important;
    }
    
    /* 移动端隐藏欢迎界面说明 */
    .color-welcome {
        display: none !important;
    }
    

    
    /* 产品树最小屏幕优化 */
    .color-category-header,
    .color-subcategory-header {
        padding: 5px 6px !important;
        font-size: 0.75rem !important;
    }
    
    .color-product-item {
        padding: 4px 6px !important;
        font-size: 0.7rem !important;
        cursor: pointer !important;
        touch-action: manipulation !important;
        -webkit-tap-highlight-color: transparent !important;
        user-select: none !important;
        -webkit-user-select: none !important;
        border-radius: 4px !important;
        transition: background-color 0.2s ease !important;
    }
    
    .color-product-item:active {
        background-color: rgba(255, 255, 255, 0.1) !important;
    }
    
    .color-product-list {
        margin-left: 8px !important;
    }
    
    /* 产品分类树标题最小屏幕优化 */
    .color-tree-title {
        font-size: 0.75rem !important;
        padding: 5px 6px !important;
        margin-bottom: 6px !important;
    }
    
    /* 图例说明区域最小屏幕优化 */
    .color-product-tree div[style*="background: #333"] {
        padding: 5px !important;
        margin-bottom: 6px !important;
        font-size: 0.6rem !important;
    }
    
    .color-product-tree div[style*="background: #333"] div {
        margin-bottom: 1px !important;
    }
}

/* 确保菜单收起功能正常工作 */
@media (max-width: 768px) {
    .navbar-collapse.show {
        max-height: 60vh !important;
        overflow-y: auto !important;
    }
    
    .navbar-nav .nav-link {
        padding: 8px 15px !important;
        font-size: 0.9rem !important;
    }
    
    /* 移动端欢迎界面优化 */
    .color-welcome {
        padding: 20px 15px !important;
        text-align: center !important;
    }
    
    .color-welcome h3 {
        font-size: 1.2rem !important;
        margin-bottom: 10px !important;
    }
    
    .color-welcome p {
        font-size: 0.9rem !important;
        line-height: 1.4 !important;
        margin-bottom: 15px !important;
        padding: 0 10px !important;
    }
    
    .color-welcome .fas {
        font-size: 2rem !important;
        margin-bottom: 15px !important;
    }
    
    /* 功能说明区域优化 */
    .color-welcome div[style*="background: #333"] {
        padding: 15px !important;
        margin-top: 15px !important;
    }
    
    .color-welcome h4 {
        font-size: 0.9rem !important;
        margin-bottom: 10px !important;
    }
    
    .color-welcome ul {
        font-size: 0.8rem !important;
    }
    
    .color-welcome li {
        margin-bottom: 6px !important;
        padding: 0 5px !important;
    }
}

@media (max-width: 576px) {
    .color-welcome {
        padding: 15px 10px !important;
    }
    
    .color-welcome h3 {
        font-size: 1.1rem !important;
    }
    
    .color-welcome p {
        font-size: 0.85rem !important;
        padding: 0 5px !important;
    }
    
    .color-welcome .fas {
        font-size: 1.8rem !important;
    }
    
    .color-welcome div[style*="background: #333"] {
        padding: 12px !important;
    }
    
    .color-welcome h4 {
        font-size: 0.85rem !important;
    }
    
    .color-welcome ul {
        font-size: 0.75rem !important;
    }
    
    .color-welcome li {
        margin-bottom: 5px !important;
    }
}

@media (max-width: 479px) {
    .color-welcome {
        padding: 10px 8px !important;
    }
    
    .color-welcome h3 {
        font-size: 1rem !important;
    }
    
    .color-welcome p {
        font-size: 0.8rem !important;
        padding: 0 3px !important;
    }
    
    .color-welcome .fas {
        font-size: 1.5rem !important;
    }
    
    .color-welcome div[style*="background: #333"] {
        padding: 10px !important;
    }
    
    .color-welcome h4 {
        font-size: 0.8rem !important;
    }
    
    .color-welcome ul {
        font-size: 0.7rem !important;
    }
    
    .color-welcome li {
        margin-bottom: 4px !important;
    }
}

/* 返回按钮样式 */
.color-back-btn {
    background: #444 !important;
    color: #fff !important;
    border: 1px solid #666 !important;
    padding: 8px 12px !important;
    border-radius: 4px !important;
    font-size: 0.8rem !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    margin-bottom: 10px !important;
    display: none !important;
}

.color-back-btn:hover {
    background: #555 !important;
    border-color: #777 !important;
}

.color-back-btn i {
    margin-right: 5px !important;
}

/* 移动端显示返回按钮 */
@media (max-width: 768px) {
    .color-interface.active .color-back-btn {
        display: block !important;
    }
    
    /* 移动端触摸优化 */
    .part-color-option {
        touch-action: manipulation !important;
        -webkit-tap-highlight-color: transparent !important;
        user-select: none !important;
        -webkit-user-select: none !important;
        min-height: 50px !important;
        min-width: 50px !important;
        cursor: pointer !important;
        position: relative !important;
        overflow: hidden !important;
    }
    
    .part-color-option:active {
        transform: scale(0.9) !important;
        transition: transform 0.1s ease !important;
        background-color: rgba(255, 255, 255, 0.2) !important;
    }
    
    .part-color-option.selected {
        transform: scale(1.1) !important;
        box-shadow: 0 0 15px rgba(255, 255, 255, 0.8) !important;
        border: 2px solid #fff !important;
    }
    
    .part-color-option::after {
        content: '' !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        background: rgba(255, 255, 255, 0.1) !important;
        opacity: 0 !important;
        transition: opacity 0.2s ease !important;
    }
    
    .part-color-option:active::after {
        opacity: 1 !important;
    }
    
    /* 移动端选部件优化 */
    .part-checkbox {
        min-width: 24px !important;
        min-height: 24px !important;
        width: 20px !important;
        height: 20px !important;
        touch-action: manipulation !important;
        -webkit-tap-highlight-color: transparent !important;
        margin-right: 8px !important;
    }
    
    .part-name {
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
        padding: 8px !important;
        touch-action: manipulation !important;
        -webkit-tap-highlight-color: transparent !important;
        cursor: pointer !important;
        border-radius: 4px !important;
        transition: background-color 0.2s ease !important;
    }
    
    .part-name:active {
        background-color: rgba(255, 255, 255, 0.1) !important;
    }
    
    .part-header {
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 8px !important;
        touch-action: manipulation !important;
        -webkit-tap-highlight-color: transparent !important;
        border-radius: 4px !important;
        transition: background-color 0.2s ease !important;
    }
    
    .part-header:active {
        background-color: rgba(255, 255, 255, 0.1) !important;
    }
} 