.main-layout {
    display: flex;
    gap: 40px;

    padding: 40px 5%;
    align-items: flex-start;
}

/* Sidebar */
.sidebar {
    flex: 0 0 220px;
}

.sidebar h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Button toggle filter (mobile) */
.filter-toggle {
    display: none;

    width: 100%;
    padding: 12px;

    background: #8b5cf6;
    color: white;

    border: none;
    border-radius: 8px;

    margin-bottom: 12px;

    font-weight: 600;
    cursor: pointer;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 10px;

    cursor: pointer;
    font-size: 16px;

    user-select: none;
}


.checkbox-container input {
    display: none;
}

/* custom checkbox box */
.checkbox-container .checkmark {
    width: 20px;
    height: 20px;

    border: 2px solid #8b5cf6;
    border-radius: 6px;

    display: flex;
    align-items: center;
    justify-content: center;

    transition: 0.2s;
}

/* check icon */
.checkbox-container .checkmark::after {
    content: "✓";
    font-size: 14px;
    color: white;

    opacity: 0;
    transform: scale(0.8);
    transition: 0.2s;
}

/* checked state */
.checkbox-container input:checked + .checkmark {
    background-color: #8b5cf6;
}

.checkbox-container input:checked + .checkmark::after {
    opacity: 1;
    transform: scale(1);
}

.content {
    flex: 1;
}


.art-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.art-card {
    transition: transform 0.3s;
    cursor: pointer;
    width: 100%;
    min-width: 0;
}

.art-card:hover {
    transform: translateY(-5px);
}

.art-card .card-link {
    text-decoration: none;
    color: #000;
    display: block;
}

.art-card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    display: block;
}

.art-card h3 {
    font-size: 1.15rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.art-card .price {
    font-size: 1rem;
    color: #333;
}


@media (max-width: 768px) {

    .main-layout {
        flex-direction: column;
        padding: 20px;
    }

    .sidebar {
        width: 100%;
        display: none;
    }

    .sidebar.open {
        display: block;
    }

    .filter-toggle {
        display: block;
    }

    .content {
        width: 100%;
    }

    .art-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .main-layout {
        padding: 1rem;
    }

    .sidebar h2 {
        font-size: 1.25rem;
    }

    .checkbox-container {
        font-size: 0.75rem;
    }

    .art-card h3 {
        font-size: 1rem;
    }
}