/* ===================================
   Main Content
   =================================== */
.colors-main {
    padding: 2rem 0 4rem;
    background-color: #f8fafc;
    min-height: 70vh;
}

/* ===================================
   Search and Filter Section
   =================================== */
.search-filter-section {
    background: #fff;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.search-box {
    position: relative;
    margin-bottom: 1rem;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #3b82f6;
}

.clear-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    line-height: 1;
    transition: color 0.3s ease;
    display: none;
}

.clear-btn.visible {
    display: block;
}

.clear-btn:hover {
    color: #475569;
}

.filter-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.filter-section label {
    font-weight: 600;
    color: #475569;
    white-space: nowrap;
}

.filter-section select {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 1rem;
    background-color: #fff;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.filter-section select:focus {
    outline: none;
    border-color: #3b82f6;
}

.results-info {
    text-align: center;
    color: #64748b;
    font-weight: 600;
    padding-top: 0.5rem;
    border-top: 1px solid #e2e8f0;
}

/* ===================================
   Color Grid
   =================================== */
.color-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.color-card {
    background: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.color-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.color-swatch {
    width: 100%;
    height: 150px;
    border-bottom: 1px solid #e2e8f0;
}

/* Favorite (star) button */
.color-card { position: relative; }
.favorite-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(0,0,0,0.08);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    color: #f59e0b;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.favorite-btn:hover { transform: translateY(-1px); }


.color-info {
    padding: 1rem;
}

.color-name {
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.color-code {
    color: #64748b;
    font-size: 0.875rem;
    font-family: 'Courier New', monospace;
}

.color-family-tag {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background-color: #e0f2fe;
    color: #0369a1;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.5rem;
    text-transform: capitalize;
}

/* ===================================
   No Results
   =================================== */
.no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: #64748b;
}

.no-results p {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

/* ===================================
   Responsive Design - Tablet
   =================================== */
@media (min-width: 640px) {
    .color-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .search-filter-section {
        padding: 2rem;
    }
}

/* ===================================
   Responsive Design - Desktop
   =================================== */
@media (min-width: 768px) {
    .color-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .color-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .colors-main {
        padding: 3rem 0 5rem;
    }
}

@media (min-width: 1280px) {
    .color-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

.color-accuracy-note {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: #fff7ed;
    border-left: 4px solid #f59e0b;
    color: #92400e;
    font-weight: 800;
    border-radius: 6px;
    line-height: 1.25;
    text-align: center;
}

.color-accuracy-note a {
    color: #92400e;
    text-decoration: underline;
    font-weight: 800;
}
