/* ========================================
   粉末喷涂色号查询页 - 专用样式
   ======================================== */

/* 页面标题区 */
.color-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    padding: 60px 0 50px;
    text-align: center;
    color: #fff;
}

.color-hero h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
}

.color-hero h1 i {
    color: var(--accent);
    margin-right: 10px;
}

.color-hero p {
    font-size: 15px;
    opacity: 0.85;
}

/* 搜索区域 */
.color-search-section {
    background: var(--bg-light);
    padding: 30px 0;
    border-bottom: 1px solid var(--border);
}

.search-box {
    max-width: 800px;
    margin: 0 auto 24px;
}

.search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 4px;
}

.search-input-wrap > i:first-child {
    position: absolute;
    left: 20px;
    color: var(--text-lighter);
    font-size: 18px;
}

.search-input-wrap input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 16px 20px 16px 50px;
    font-size: 16px;
    outline: none;
    color: var(--text);
}

.search-input-wrap input::placeholder {
    color: var(--text-lighter);
}

.search-clear {
    background: none;
    border: none;
    color: var(--text-lighter);
    padding: 12px 16px;
    cursor: pointer;
    font-size: 16px;
    transition: var(--transition);
}

.search-clear:hover {
    color: var(--accent);
}

.search-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 16px;
}

.search-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
}

.search-tag:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-1px);
}

.search-tag i {
    color: var(--accent);
    font-size: 11px;
}

/* 筛选栏 */
.filter-bar {
    margin-top: 20px;
}

.filter-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    white-space: nowrap;
    padding-top: 8px;
    min-width: 70px;
}

.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
}

.filter-tab {
    padding: 8px 18px;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: var(--radius);
    font-size: 14px;
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.filter-tab:hover {
    border-color: var(--primary-light);
    color: var(--primary);
}

.filter-tab.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 20px;
    font-size: 13px;
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
}

.filter-chip:hover {
    border-color: var(--primary-light);
    background: var(--bg-light);
}

.filter-chip.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.filter-chip.active .chip-dot {
    border-color: #fff !important;
}

.chip-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: inline-block;
}

/* 统计栏 */
.color-stats {
    background: #fff;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}

.stats-bar {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-num {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.stat-label {
    font-size: 13px;
    color: var(--text-light);
    margin-top: 4px;
}

/* 色卡网格 */
.color-grid-section {
    padding: 40px 0 60px;
    background: var(--bg-light);
    min-height: 400px;
}

.color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}

/* 色卡卡片 */
.color-card {
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

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

.color-card .color-block {
    height: 100px;
    position: relative;
}

.color-card .color-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
}

.color-card .color-badge.ral {
    background: rgba(26,54,93,0.75);
}

.color-card .color-badge.gsb {
    background: rgba(237,137,54,0.85);
}

.color-card .color-info {
    padding: 12px;
}

.color-card .color-code {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
    font-family: 'SF Mono', Monaco, monospace;
}

.color-card .color-name {
    font-size: 13px;
    color: var(--text);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.color-card .color-name-en {
    font-size: 11px;
    color: var(--text-lighter);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.color-card .color-meta {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.color-card .color-meta span {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    background: var(--bg-light);
    color: var(--text-light);
}

.color-card .color-meta .outdoor {
    background: #e8f5e9;
    color: #2e7d32;
}

.color-card .color-meta .indoor {
    background: #fff3e0;
    color: #ef6c00;
}

/* 无结果 */
.no-results {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-light);
}

.no-results i {
    font-size: 48px;
    margin-bottom: 16px;
    color: var(--text-lighter);
}

.no-results p {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 8px;
}

.no-results span {
    font-size: 14px;
}

/* 色号信息区 */
.color-info-section {
    padding: 60px 0;
    background: #fff;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.info-card {
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--border);
}

.info-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.info-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: #fff;
    font-size: 24px;
}

.info-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 12px;
}

.info-card p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 16px;
}

.info-meta {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.info-meta span {
    font-size: 12px;
    color: var(--text-lighter);
}

.info-meta i {
    color: var(--accent);
    margin-right: 4px;
}

/* 使用指南 */
.color-usage-guide {
    padding: 60px 0;
    background: var(--bg-light);
}

.guide-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.guide-step {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 28px 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.guide-step:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.guide-step .step-num {
    width: 40px;
    height: 40px;
    background: var(--accent);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    margin: 0 auto 16px;
}

.guide-step h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 10px;
}

.guide-step p {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.6;
}

/* 弹窗 */
.color-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.color-modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: #fff;
    border-radius: var(--radius-lg);
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(0,0,0,0.1);
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    color: var(--text);
    transition: var(--transition);
    z-index: 10;
}

.modal-close:hover {
    background: var(--accent);
    color: #fff;
}

.modal-body {
    padding: 0;
}

.modal-color-preview {
    height: 160px;
    position: relative;
}

.modal-color-preview .preview-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
}

.modal-color-preview .preview-hex {
    position: absolute;
    bottom: 16px;
    right: 16px;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    font-family: 'SF Mono', Monaco, monospace;
}

.modal-details {
    padding: 24px;
}

.modal-details h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.modal-details .modal-subtitle {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 20px;
}

.detail-row {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    width: 100px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    flex-shrink: 0;
}

.detail-value {
    flex: 1;
    font-size: 14px;
    color: var(--text);
}

.detail-value .match-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: var(--bg-light);
    border-radius: 4px;
    font-size: 13px;
    color: var(--primary);
    cursor: pointer;
    transition: var(--transition);
}

.detail-value .match-link:hover {
    background: var(--primary);
    color: #fff;
}

.detail-value .match-link i {
    font-size: 11px;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.detail-tag {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    background: var(--bg-light);
    color: var(--text);
}

.detail-tag.outdoor {
    background: #e8f5e9;
    color: #2e7d32;
}

.detail-tag.indoor {
    background: #fff3e0;
    color: #ef6c00;
}

.detail-tag.process {
    background: #e3f2fd;
    color: #1565c0;
}

/* 响应式 */
@media (max-width: 1024px) {
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .guide-steps {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .color-hero {
        padding: 40px 0 30px;
    }
    
    .color-hero h1 {
        font-size: 24px;
    }
    
    .search-input-wrap input {
        font-size: 14px;
        padding: 14px 16px 14px 44px;
    }
    
    .filter-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .filter-group label {
        padding-top: 0;
    }
    
    .stats-bar {
        gap: 30px;
    }
    
    .color-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .guide-steps {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        max-width: 100%;
        margin: 10px;
    }
}

@media (max-width: 480px) {
    .color-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .color-card .color-block {
        height: 80px;
    }
    
    .color-card .color-info {
        padding: 8px;
    }
    
    .color-card .color-code {
        font-size: 13px;
    }
    
    .color-card .color-name {
        font-size: 12px;
    }
}
