/* General Reset & Background */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "Open Sans", Arial, sans-serif; font-size: 16px; background-color: #1A1625; min-height: 100vh; }

/* Header & Navigation */
header { 
    background-color: rgba(42, 37, 56, 0.7); 
    backdrop-filter: blur(8px); 
    color: #F8F7FC; 
    padding: 16px; 
    position: sticky; 
    top: 0; 
    z-index: 10; 
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); 
}

.header-content { display: flex; align-items: center; gap: 8px; }
.header-title { font-size: 18px; font-weight: 600; }
.header-subtitle { font-size: 12px; color: #A79DB5; }

.logo-link { color: inherit; text-decoration: none; display: flex; align-items: center; flex-shrink: 0; }
.logo-link svg { width: 24px; height: 24px; display: block; stroke: #F8F7FC; }

/* Group Filters (Formerly Testament Filters) */
.group-filters { 
    display: flex; 
    gap: 8px; 
    flex-wrap: wrap; 
    margin-top: 12px; 
}

.filter-button { 
    padding: 6px 12px; 
    border-radius: 9999px; 
    border: none; 
    font-size: 13px; 
    cursor: pointer; 
    transition: all 0.2s; 
    background-color: #1A1625; 
    color: #DDD8E4; 
}
.filter-button.active { background-color: #A79DB5; color: #1A1625; }

/* Main Content Area */
main { padding: 16px 16px 32px; }

/* Category Sections & Grids */
.category-section { margin-bottom: 24px; }
.category-title { 
    font-size: 12px; 
    font-weight: 600; 
    color: #8A8196; 
    text-transform: uppercase; 
    letter-spacing: 0.05em; 
    margin-bottom: 12px; 
}

/* Color Cards (Formerly Book Cards) */
.colors-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); 
    gap: 12px; 
}

.color-card { 
    padding: 16px; 
    border-radius: 8px; 
    text-align: left; 
    cursor: pointer; 
    border: none; 
    width: 100%; 
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 80px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.color-name { font-weight: 600; margin-bottom: 2px; }
.color-sku { font-size: 11px; opacity: 0.8; }

/* Swatch View (Formerly Chapters View) */
.swatch-grid { 
    display: flex; 
    justify-content: center; 
    padding-top: 40px; 
}

.detail-button {
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}
.detail-button:hover { transform: scale(1.05); }

/* Utility */
.back-button { 
    padding: 4px; 
    background: none; 
    border: none; 
    color: #C4BDD0; 
    cursor: pointer; 
    border-radius: 4px; 
    display: flex; 
    align-items: center; 
}
.back-button:hover { background-color: #3A3449; }
.hidden { display: none !important; }

/* Footer */
footer { 
    margin-top: 16px; 
    padding: 32px 12px; 
    border-top: 2px solid #3A3449; 
    background-color: #1A1625; 
    text-align: center; 
    color: #8A8196; 
    font-size: 0.9rem; 
}

/* Responsive Adjustments */
@media only screen and (max-width: 600px) {
    .group-filters { 
        display: grid; 
        grid-template-columns: repeat(3, 1fr); 
        gap: 6px; 
    }
    .filter-button { font-size: 11px; padding: 6px 4px; text-align: center; }
    .colors-grid { grid-template-columns: repeat(2, 1fr); }
}

@media only screen and (min-width: 601px) and (max-width: 1024px) {
    .colors-grid { grid-template-columns: repeat(3, 1fr); }
    .group-filters { grid-template-columns: repeat(5, 1fr); display: grid; }
}