/* ===================================
   色卡页面专属样式
   =================================== */

/* Page Hero (小尺寸) */
.page-hero {
    position: relative;
    height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    background-image: url('../images/hero-background.jpg');
    background-size: cover;
    background-position: center;
    margin-top: 70px;
    overflow: hidden;
}

.page-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(44, 62, 80, 0.75);
}

.page-hero-content {
    position: relative;
    text-align: center;
    color: white;
    z-index: 1;
    padding: var(--spacing-md);
}

.page-hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.page-hero-subtitle {
    font-size: 1.2rem;
    font-weight: 300;
    opacity: 0.9;
    margin-bottom: 1rem;
}

/* 面包屑 */
.breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    opacity: 0.85;
}

.breadcrumb a {
    color: white;
    text-decoration: none;
    transition: opacity var(--transition-fast);
}

.breadcrumb a:hover {
    opacity: 0.7;
}

.breadcrumb-sep {
    opacity: 0.6;
}

.breadcrumb-current {
    font-weight: 500;
}

/* Colors Section */
.colors-section {
    padding-top: var(--spacing-lg);
    padding-bottom: var(--spacing-xl);
    background: var(--bg-white);
}

/* Toolbar */
.colors-toolbar {
    margin-bottom: var(--spacing-md);
}

.colors-search {
    position: relative;
    max-width: 400px;
    margin: 0 auto var(--spacing-md);
}

.search-input {
    width: 100%;
    padding: 0.85rem 1.2rem 0.85rem 3rem;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    font-size: 1rem;
    font-family: var(--font-primary);
    color: var(--text-dark);
    background: var(--bg-white);
    transition: all var(--transition-fast);
    outline: none;
}

.search-input:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

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

.search-icon {
    position: absolute;
    left: 1.1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text-light);
    pointer-events: none;
}

/* Filter Pills */
.colors-filter {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.colors-filter .filter-btn {
    padding: 0.55rem 1.3rem;
    font-size: 0.9rem;
}

/* Color Count */
.colors-count {
    text-align: center;
    margin-bottom: var(--spacing-md);
    font-size: 0.95rem;
    color: var(--text-light);
}

.colors-count span:first-child {
    font-weight: 600;
    color: var(--secondary-color);
}

/* Color Grid */
.colors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

/* Color Card */
.color-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    cursor: pointer;
    border: 1px solid var(--border-color);
    opacity: 1;
    transform: scale(1);
}

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

.color-card.hidden {
    display: none;
}

.color-card.fade-out {
    opacity: 0;
    transform: scale(0.9);
}

.color-swatch {
    width: 100%;
    padding-top: 80%;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.color-swatch-inner {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.color-swatch-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast);
}

.color-card:hover .color-swatch-overlay {
    background: rgba(0, 0, 0, 0.15);
}

.color-swatch-overlay svg {
    width: 32px;
    height: 32px;
    color: white;
    opacity: 0;
    transform: scale(0.8);
    transition: all var(--transition-fast);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.color-card:hover .color-swatch-overlay svg {
    opacity: 1;
    transform: scale(1);
}

.color-info {
    padding: 1rem;
}

.color-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.color-meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.color-tag {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    font-size: 0.75rem;
    border-radius: 20px;
    background: var(--bg-light);
    color: var(--text-light);
    font-weight: 500;
    text-transform: capitalize;
}

/* No Results */
.colors-empty {
    text-align: center;
    padding: var(--spacing-lg) var(--spacing-md);
    color: var(--text-light);
}

.colors-empty svg {
    width: 64px;
    height: 64px;
    margin-bottom: var(--spacing-sm);
    opacity: 0.5;
}

.colors-empty p {
    font-size: 1.1rem;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.lightbox-content {
    position: relative;
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    overflow: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9) translateY(20px);
    transition: transform var(--transition-normal);
}

.lightbox.active .lightbox-content {
    transform: scale(1) translateY(0);
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    transition: all var(--transition-fast);
    z-index: 10;
}

.lightbox-close:hover {
    background: rgba(0, 0, 0, 0.12);
    transform: rotate(90deg);
}

.lightbox-body {
    display: flex;
    flex-direction: column;
}

.lightbox-swatch {
    width: 100%;
    height: 240px;
    border-radius: 16px 16px 0 0;
}

.lightbox-info {
    padding: 2rem;
}

.lightbox-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.lightbox-code {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-family: 'SF Mono', 'Fira Code', monospace;
}

.lightbox-details {
    margin-bottom: 1.5rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.detail-label {
    font-size: 0.9rem;
    color: var(--text-light);
}

.detail-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    text-transform: capitalize;
}

.btn-inquiry {
    display: block;
    width: 100%;
    text-align: center;
    padding: 1rem 2rem;
    background: var(--secondary-color);
    color: white;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.btn-inquiry:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.35);
}

/* Responsive */
@media (max-width: 1024px) {
    .colors-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .page-hero {
        height: 250px;
        margin-top: 60px;
    }

    .page-hero-title {
        font-size: 2.2rem;
    }

    .page-hero-subtitle {
        font-size: 1rem;
    }

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

    .colors-filter {
        gap: 0.4rem;
    }

    .colors-filter .filter-btn {
        padding: 0.45rem 1rem;
        font-size: 0.8rem;
    }

    .lightbox-content {
        width: 95%;
        max-height: 90vh;
    }

    .lightbox-swatch {
        height: 180px;
    }

    .lightbox-info {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .page-hero {
        height: 200px;
    }

    .page-hero-title {
        font-size: 1.8rem;
    }

    .colors-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .color-info {
        padding: 0.75rem;
    }

    .color-name {
        font-size: 0.85rem;
    }

    .color-tag {
        font-size: 0.7rem;
    }

    .search-input {
        font-size: 0.9rem;
        padding: 0.75rem 1rem 0.75rem 2.5rem;
    }
}
