/* FONT IMPORT */
@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@400;700;900&family=Montserrat:wght@400;500;600&display=swap');

/* BASIC RESET & THEME */
:root {
    --primary-green: #556b2f;
    --dark-green: #2e4034;
    --background-dark: #1a2a26;
    --text-light: #f2f2f2;
    --text-muted: #a0a0a0;
    --border-color: rgba(255, 255, 255, 0.15);
    --module-bg: rgba(255, 255, 255, 0.05);
    --module-bg-hover: rgba(255, 255, 255, 0.1);
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--background-dark);
    color: var(--text-light);
    margin: 0;
    padding-top: 80px; /* Space for fixed header */
}

/* BACKGROUND CYCLER & OVERLAY */
#background-cycler {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -2;
    background-size: cover; background-position: center; transition: background-image 1.5s ease-in-out;
}
.background-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(26, 42, 38, 0.9), rgba(26, 42, 38, 0.7));
    z-index: -1;
}

/* This placeholder will be filled by ui-loader.js */
#header-placeholder {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

/* MAIN LAYOUT */
.page-container { max-width: 1400px; margin: 2rem auto; padding: 0 20px; }

/* PAGE HEADER */
.page-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border-color);
}
.page-header h1 { font-family: 'Merriweather', serif; font-size: 3rem; margin: 0; }
.page-header .subtitle { font-size: 1.1rem; color: var(--text-muted); margin: 0.5rem 0 0 0; }
.action-btn {
    background-color: var(--primary-green); color: white; padding: 10px 20px; border-radius: 5px;
    text-decoration: none; font-weight: bold; border: none; cursor: pointer;
}

/* FILTER & VIEW BAR */
.filter-bar {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem;
}
.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.filter-tabs button, .view-toggle button {
    background: none; border: 1px solid var(--border-color); color: var(--text-muted);
    padding: 8px 20px; cursor: pointer; font-size: 1rem; text-decoration: none;
    border-radius: 5px;
}
.filter-tabs button.active, .view-toggle button.active {
    background-color: var(--primary-green); color: white; border-color: var(--primary-green);
}
.view-toggle {
    display: flex;
}
.view-toggle button:first-child { border-radius: 5px 0 0 5px; }
.view-toggle button:last-child { border-radius: 0 5px 5px 0; border-left: none; }

/* --- THIS IS THE FIX: Removed the .sub-filter-bar styles --- */

/* COLLECTION GRID & ITEMS */
.collection-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem; min-height: 100px;
}

.grid-item {
    background-color: var(--module-bg); border-radius: 8px; overflow: hidden;
    text-decoration: none; color: var(--text-light); display: block;
    transition: transform 0.3s, background-color 0.3s;
}
.grid-item:hover { transform: translateY(-5px); background-color: var(--module-bg-hover); }

.grid-item-image {
    width: 100%; height: 200px; background-size: cover; background-position: center;
}
.grid-item-info { padding: 1rem; }
.grid-item-info h3 { margin: 0 0 0.5rem 0; font-size: 1.2rem; }
.grid-item-info p { margin: 0; font-style: italic; color: var(--text-muted); }

/* This is no longer needed but is kept for potential future use if "not found" is re-introduced */
.grid-item.not-found .grid-item-image {
    filter: blur(4px) grayscale(60%);
    opacity: 0.6;
}
.grid-item.not-found:hover .grid-item-image {
    filter: blur(2px) grayscale(20%);
}

.empty-message {
    grid-column: 1 / -1; /* Make the message span the full grid width */
    padding: 2rem; text-align: center; color: var(--text-muted);
    background-color: var(--module-bg); border-radius: 8px;
}