/* --- 1. SETTINGS & VARIABLES --- */
:root {
    --bg-color: #121212;         
    --sidebar-bg: #1a1a1a;       
    --card-bg: #1e1e1e;          
    --header-card-bg: #222222;   
    --text-main: #ffffff;        
    --text-muted: #b0b0b0;       
    --accent-color: #ffffff;     
    --font-main: 'Inter', sans-serif;
    
    /* SHAPE SETTING: 4px is sharp/slightly rounded */
    --radius-sharp: 4px; 
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-main);
    overflow-x: hidden; 
}

/* --- 2. MENU & SIDEBAR --- */
.menu-toggle {
    position: fixed; top: 20px; left: 20px;
    background: var(--card-bg); color: white;
    border: 1px solid #333; font-size: 1.5rem;
    padding: 8px 12px; 
    border-radius: var(--radius-sharp); 
    cursor: pointer; z-index: 1000;
    transition: background 0.2s;
}
.menu-toggle:hover { background: #333; }

#sidebar {
    position: fixed; top: 0; left: -300px; 
    width: 300px; height: 100vh;
    background-color: var(--sidebar-bg);
    padding: 2rem; transition: left 0.3s ease-in-out;
    z-index: 1100; box-shadow: 4px 0 15px rgba(0,0,0,0.5);
}
#sidebar.open { left: 0; } 

.sidebar-header { display: flex; justify-content: space-between; margin-bottom: 2rem; }
.logo { font-weight: bold; letter-spacing: 2px; }
.close-btn { background: none; border: none; color: white; font-size: 1.5rem; cursor: pointer; }

.nav-links { list-style: none; }
.nav-links li { padding: 15px 0; cursor: pointer; border-bottom: 1px solid #333; font-size: 1.1rem; }
.nav-links li:hover { color: var(--accent-color); }

.submenu { list-style: none; padding-left: 20px; background: #222; display: block; margin-top: 5px; }
.hidden-submenu { display: none; }
.submenu li { border-bottom: none; font-size: 0.95rem; color: var(--text-muted); }

/* --- 3. MAIN CONTENT LAYOUT --- */
#main-content {
    padding: 0 20px 50px 20px;
    max-width: 1400px; /* Made wider for masonry */
    margin: 0 auto;
}
.text-content { text-align: center; max-width: 600px; margin: 0 auto; line-height: 1.6; }

/* --- 4. HERO HEADER --- */
.hero-header {
    display: flex;
    justify-content: center;
    padding: 6rem 0 4rem 0;
}

.header-card-bg {
    background-color: var(--card-bg);
    border: 1px solid #333;
    padding: 3rem 5rem;
    border-radius: var(--radius-sharp);
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    min-width: 50%; 
}

.artist-name {
    font-size: 3.5rem; 
    font-weight: 800;
    letter-spacing: 0px;
    text-transform: none;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.subtitle {
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: 3px;
    color: var(--text-muted);
    text-transform: none;
}

/* --- 5. SECTION HEADERS --- */
.section-header {
    display: flex;
    justify-content: center;
    margin: 4rem 0 3rem 0;
}

.section-header span {
    background-color: var(--header-card-bg);
    padding: 10px 30px;
    border-radius: var(--radius-sharp);
    font-weight: 400;
    letter-spacing: 1px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    border: 1px solid #444;
}

/* --- 6. MASONRY LAYOUT (Pinterest Style) --- */
.grid-container {
    /* Instead of GRID, we use COLUMNS */
    column-count: 3; 
    column-gap: 2rem;
    margin-bottom: 4rem;
}

.card {
    background-color: var(--card-bg);
    border-radius: var(--radius-sharp);
    overflow: hidden;
    transition: transform 0.2s;
    border: 1px solid #333;
    
    /* MASONRY CRITICAL LINES: */
    display: inline-block; /* Prevents column glitches */
    width: 100%;           /* Fills the column width */
    margin-bottom: 2rem;   /* Space between vertical items */
    break-inside: avoid;   /* Prevents card getting cut in half */
}

.card:hover { transform: translateY(-5px); border-color: var(--accent-color); }

/* --- 7. IMAGE HANDLING (Natural Size) --- */
.card-img {
    width: 100%;
    /* Auto height allows the card to stretch to fit the image exactly */
    height: auto; 
    display: block; /* Removes bottom gap */
    cursor: pointer;
}

/* Card Info */
.card-info { padding: 1.5rem; text-align: center; }
.card-title { font-size: 1.2rem; margin-bottom: 0.5rem; font-weight: 300; }
.card-price { color: var(--accent-color); font-weight: bold; margin-top: 5px; }

/* View Button */
.btn-view-full {
    background: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: var(--radius-sharp);
    cursor: pointer;
    font-size: 0.8rem;
    margin-top: 10px;
    transition: 0.2s;
}
.btn-view-full:hover { border-color: white; color: white; background: rgba(255,255,255,0.1); }

/* --- 8. PRODUCT PAGE --- */
.back-btn {
    background-color: var(--header-card-bg);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1rem;
    border-radius: var(--radius-sharp);
    cursor: pointer;
    margin: 8rem 0 2rem 0;
    display: inline-flex;
    align-items: center;
    transition: background 0.2s;
}
.back-btn:hover { background-color: #444; }

.product-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; }
.product-image-container img { width: 100%; border-radius: var(--radius-sharp); border: 1px solid #333; }
.product-details h1 { font-size: 2.5rem; margin-bottom: 0.5rem; }
.product-details h2 { font-size: 1.5rem; color: var(--accent-color); margin-bottom: 2rem; }
.product-details p { line-height: 1.6; color: var(--text-muted); margin-bottom: 2rem; }
.buy-button {
    display: inline-block; background-color: var(--accent-color);
    color: #121212; padding: 18px 40px; 
    border-radius: var(--radius-sharp);
    text-decoration: none; font-weight: 800; font-size: 1.1rem;
}

.hidden { display: none !important; }

/* Mobile Adjustments */
@media (max-width: 768px) {
    .artist-name { font-size: 2rem; }
    .header-card-bg { padding: 2rem; width: 100%; }
    .product-layout { grid-template-columns: 1fr; }
    
    /* Mobile: 1 Column Masonry */
    .grid-container { column-count: 1; }
}