:root {
    --bg-color: #FDFBF7;
    --sidebar-bg: #F7F5F0;
    --white: #FFFFFF;
    --text-dark: #1A1A1A;
    --text-grey: #888888;
    --font-main: 'Poppins', sans-serif;
    
    /* Card Colors */
    --c-pink: #F8D5D8;
    --c-peach: #F8E3C6;
    --c-lavender: #D7D3F6;
    --c-mint: #D3F3E5;
    
    --border-light: #EBEBEB;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-dark);
    height: 100vh;
    overflow: hidden;
}

/* LAYOUT */
.app-container {
    display: grid;
    grid-template-columns: 80px 1fr 250px; 
    height: 100vh;
}

/* SIDEBAR */
.sidebar {
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 0;
    border-right: 1px solid var(--border-light);
}
.logo-icon { font-size: 2rem; margin-bottom: 40px; }
.menu { display: flex; flex-direction: column; gap: 30px; }
.menu-item { font-size: 1.5rem; color: #CCC; transition: 0.3s; }
.menu-item.active, .menu-item:hover { color: var(--text-dark); }
.user-profile { margin-top: auto; }
.user-profile img { width: 40px; height: 40px; border-radius: 50%; border: 2px solid white; }

/* MAIN CONTENT */
.main-content { padding: 40px; overflow-y: auto; }

/* Header */
.top-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 30px; }
h1 { font-size: 2.5rem; font-weight: 600; line-height: 1.2; }
h1 span { opacity: 0.5; }

.search-bar {
    background: var(--white);
    padding: 12px 20px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    width: 300px;
}
.search-bar input { border: none; outline: none; width: 100%; font-family: inherit; }

/* Filters */
.filters { display: flex; gap: 15px; margin-bottom: 30px; flex-wrap: wrap; }
.filter-pill {
    border: none;
    background: var(--white);
    padding: 10px 20px;
    border-radius: 20px;
    font-family: inherit;
    font-weight: 500;
    color: var(--text-grey);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}
.filter-pill:hover { transform: translateY(-2px); color: var(--text-dark); }
.filter-pill.active { background: var(--text-dark); color: var(--white); }

/* Grid */
.section-title { font-weight: 600; font-size: 1.1rem; margin-bottom: 20px; color: var(--text-grey); }
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 25px;
    padding-bottom: 40px;
}

/* CARDS */
.card {
    border-radius: 25px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 240px;
    cursor: pointer;
    transition: transform 0.2s;
}
.card:hover { transform: translateY(-5px); }

.card.pink { background-color: var(--c-pink); }
.card.peach { background-color: var(--c-peach); }
.card.lavender { background-color: var(--c-lavender); }
.card.mint { background-color: var(--c-mint); }

.card-header { display: flex; justify-content: flex-start; }
.card-icon { font-size: 1.5rem; background: rgba(255,255,255,0.5); width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 12px; }

.card-title { font-size: 1.25rem; font-weight: 600; margin-top: 20px; }
.card-students { font-size: 0.85rem; opacity: 0.7; margin-bottom: 20px; }

.card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }
.price { font-size: 1.2rem; font-weight: 700; }
.buy-btn-small {
    background: var(--text-dark);
    color: var(--white);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    text-decoration: none; /* For the <a> tag */
    transition: transform 0.2s;
}
.buy-btn-small:hover { transform: scale(1.1); }

/* RIGHT PANEL */
.right-panel { background: var(--bg-color); padding: 40px; border-left: 1px solid var(--border-light); }
.panel-card { background: var(--white); padding: 25px; border-radius: 20px; text-align: center; }
.btn-small { background: var(--text-dark); color: var(--white); border: none; padding: 10px 20px; border-radius: 12px; cursor: pointer; margin-top: 15px; }

/* RESPONSIVE */
@media (max-width: 1024px) {
    .app-container { grid-template-columns: 80px 1fr; }
    .right-panel { display: none; }
}
@media (max-width: 600px) {
    .app-container { display: flex; flex-direction: column-reverse; height: 100vh; }
    .sidebar { flex-direction: row; width: 100%; height: 70px; padding: 0 30px; border-right: none; border-top: 1px solid var(--border-light); justify-content: space-between; background: var(--white); z-index: 10; }
    .logo-area, .user-profile { display: none; }
    .menu { flex-direction: row; width: 100%; justify-content: space-around; gap: 0; }
    .main-content { padding: 20px; padding-bottom: 80px; height: calc(100vh - 70px); }
    .top-header { flex-direction: column; gap: 20px; }
    .search-bar { width: 100%; }
    .filters { overflow-x: auto; padding-bottom: 10px; flex-wrap: nowrap; }
    .filter-pill { white-space: nowrap; }
}